Skip to content

Commit

Permalink
Disable update command on Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
raidensakura committed Apr 13, 2024
1 parent 3155970 commit 15993a3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ however, insignificant breaking changes do not guarantee a major version bump, s
### Fixed

- Thread auto close now checks for `thread_auto_close` config before actually closing the ticket. [(#3290)](https://github.com/modmail-dev/Modmail/issues/3290)
- Update command on Docker platform has been disabled. [(OpenModmail#76304f1)](https://github.com/khakers/OpenModmail/commit/76304f19553fe086ac79beab222c23fb224c88c9)

# v4.3.1

Expand Down
10 changes: 10 additions & 0 deletions cogs/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -1989,6 +1989,16 @@ async def update(self, ctx, *, flag: str = ""):
To stay up-to-date with the latest commit from GitHub, specify "force" as the flag.
"""

if self.bot.hosting_method == HostingMethod.DOCKER:
return await ctx.send(
embed=discord.Embed(
title="This command is not supported on Docker",
description="You can update your bot by pulling the latest image from the registry:"
"\n`docker pull ghcr.io/raidensakura/modmail:stable`",
color=self.bot.error_color,
)
)

changelog = await Changelog.from_url(self.bot)
latest = changelog.latest_version

Expand Down

0 comments on commit 15993a3

Please sign in to comment.