Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
uses: actions/checkout@v2

- name: Install Python Dependencies
uses: HassanAbouelela/actions/setup-python@setup-python_v1.3.2
uses: HassanAbouelela/actions/setup-python@setup-python_v1.6.0
with:
dev: true
install_args: --no-root
python_version: '3.9'

# We will not run `flake8` here, as we will use a separate flake8
Expand All @@ -39,5 +39,6 @@ jobs:
# Format used:
# ::error file={filename},line={line},col={col}::{message}
- name: Run flake8
run: "flake8 \
--format='::error file=%(path)s,line=%(row)d,col=%(col)d::[flake8] %(code)s: %(text)s'"
run: |
flake8 \
--format='::error file=%(path)s,line=%(row)d,col=%(col)d::[flake8] %(code)s: %(text)s'
21 changes: 12 additions & 9 deletions ban_appeals/ban_appeals.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,20 +157,23 @@ async def _handle_join(self, member: discord.Member) -> None:
if not thread:
return

category = await self.get_useable_appeal_category()
description = "The recipient has joined the appeals server."
if thread.channel.category.id not in self.appeal_categories:
category = await self.get_useable_appeal_category()
description = f"Thread moved to `{category}` category since recipient has joined the appeals server."
await thread.channel.move(
category=category,
end=True,
sync_permissions=True,
reason=f"{member} joined appeals server.",
)

embed = discord.Embed(
description=f"Moving thread to `{category}` category since recipient has joined the appeals server.",
description=description,
color=self.bot.mod_color
)
await thread.channel.send(embed=embed)

await thread.channel.move(
category=category,
end=True,
sync_permissions=True,
reason=f"{member} joined appeals server.",
)

async def _handle_remove(self, member: discord.Member) -> None:
"""
Notify if a member who is appealing leaves the appeals guild.
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "1.0.0"
description = "A collection of modmail plugins for the Python Discord community."
authors = ["Python Discord <info@pythondiscord.com>"]
license = "MIT"
package-mode = false

[tool.poetry.dependencies]
python = "3.9.*"
Expand Down