diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4d01690112..9540bdfa09 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -21,12 +21,19 @@ jobs: with: python-version: ${{ matrix.python-version }} architecture: x64 - - name: Install dependencies - run: | - python -m pip install black ruff + - uses: Gr1N/setup-poetry@v9 + - name: Cache poetry + id: cache-poetry + uses: actions/cache@v4.0.2 + with: + path: ~/.cache/pypoetry/virtualenvs + key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} + - name: Maybe install dependencies + if: steps.cache-venv.outputs.cache-hit != 'true' + run: poetry install --no-root --only dev - name: Ruff - run: ruff . --no-fix + run: poetry run ruff . --no-fix --config pyproject.toml continue-on-error: true - name: Black run: | - black . --diff --check + poetry run black . --diff --check --config pyproject.toml diff --git a/.github/workflows/load-check.yml b/.github/workflows/load-check.yml index 80e336c5cc..0138abec0b 100644 --- a/.github/workflows/load-check.yml +++ b/.github/workflows/load-check.yml @@ -21,18 +21,16 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - uses: Gr1N/setup-poetry@v8 + - uses: Gr1N/setup-poetry@v9 - name: Cache poetry id: cache-poetry - uses: actions/cache@v3 + uses: actions/cache@v4.0.2 with: path: ~/.cache/pypoetry/virtualenvs key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} - - name: Maybe install dependencies if: steps.cache-venv.outputs.cache-hit != 'true' run: poetry install --no-root - - name: Run script loadcheck.py run: | poetry run python .github/workflows/scripts/loadcheck.py @@ -40,8 +38,7 @@ jobs: TOKEN: ${{ secrets.DISCORD_TEST_BOT }} CONNECTION_URI: ${{ secrets.CONNECTION_URI }} LOG_URL: https://domain.example - GUILD_ID: "616969119685935162" - MODMAIL_GUILD_ID: "1100011945207271494" + GUILD_ID: "1100011945207271494" OWNERS: "243316261264556032,505386507440488458" DATA_COLLECTION: off LOG_LEVEL: DEBUG diff --git a/README.md b/README.md index 1395e821d4..d6d38a83d5 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ This guide assume you already have Docker or Docker Compose installed. Issues with this fork can be opened through [GitHub Issues](https://github.com/raidensakura/modmail/issues/new/choose). Support for this forked version of Modmail can be requested through [Raiden's Discord server](https://dsc.gg/transience). -As I don't have a dedicated team to answer questions and provide help, response may not be as fast as official support. +As I don't have a dedicated team to answer questions and provide help, it will be answered based on my availability. ## Contributing diff --git a/cogs/plugins.py b/cogs/plugins.py index 766beb5c03..736ab1d09a 100644 --- a/cogs/plugins.py +++ b/cogs/plugins.py @@ -44,7 +44,7 @@ def __init__(self, user, repo=None, name=None, branch=None): self.repo = repo self.name = name self.local = False - self.branch = branch if branch is not None else "stable" + self.branch = branch if branch is not None else "main" self.url = f"https://github.com/{user}/{repo}/archive/{self.branch}.zip" self.link = f"https://github.com/{user}/{repo}/tree/{self.branch}/{name}" diff --git a/cogs/utility.py b/cogs/utility.py index e788dc2a11..e38aa87e22 100644 --- a/cogs/utility.py +++ b/cogs/utility.py @@ -277,7 +277,7 @@ def cog_unload(self): @commands.command() @checks.has_permissions(PermissionLevel.REGULAR) - @utils.trigger_typing + @trigger_typing async def changelog(self, ctx, version: str.lower = ""): """Shows the changelog of the Modmail.""" changelog = await Changelog.from_url(self.bot) @@ -310,7 +310,7 @@ async def changelog(self, ctx, version: str.lower = ""): @commands.command(aliases=["info"]) @checks.has_permissions(PermissionLevel.REGULAR) - @utils.trigger_typing + @trigger_typing async def about(self, ctx): """Shows information about this bot.""" embed = discord.Embed(color=self.bot.main_color, timestamp=discord.utils.utcnow()) @@ -381,7 +381,7 @@ async def about(self, ctx): @commands.command(aliases=["sponsor"]) @checks.has_permissions(PermissionLevel.REGULAR) - @utils.trigger_typing + @trigger_typing async def sponsors(self, ctx): """Shows the sponsors of this project.""" @@ -403,7 +403,7 @@ async def sponsors(self, ctx): @commands.group(invoke_without_command=True) @checks.has_permissions(PermissionLevel.OWNER) - @utils.trigger_typing + @trigger_typing async def debug(self, ctx): """Shows the recent application logs of the bot.""" @@ -456,7 +456,7 @@ async def debug(self, ctx): @debug.command(name="hastebin", aliases=["haste"]) @checks.has_permissions(PermissionLevel.OWNER) - @utils.trigger_typing + @trigger_typing async def debug_hastebin(self, ctx): """Posts application-logs to Hastebin.""" @@ -493,7 +493,7 @@ async def debug_hastebin(self, ctx): @debug.command(name="clear", aliases=["wipe"]) @checks.has_permissions(PermissionLevel.OWNER) - @utils.trigger_typing + @trigger_typing async def debug_clear(self, ctx): """Clears the locally cached logs.""" @@ -670,7 +670,7 @@ async def before_loop_presence(self): @commands.command() @checks.has_permissions(PermissionLevel.ADMINISTRATOR) - @utils.trigger_typing + @trigger_typing async def ping(self, ctx): """Pong! Returns your websocket latency.""" embed = discord.Embed(