Skip to content
Open
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
8 changes: 1 addition & 7 deletions bot/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,7 @@ class _Categories(EnvConfig, env_prefix="categories_"):

logs: int = 468520609152892958
moderators: int = 749736277464842262
modmail: int = 714494672835444826
new_modmail: int = 1533613940318146702
appeals: int = 890331800025563216
appeals_2: int = 895417395261341766
modmail: int = 1533613940318146702
voice: int = 356013253765234688

# 2021 Summer Code Jam
Expand All @@ -207,10 +204,7 @@ class _Guild(EnvConfig, env_prefix="guild_"):
moderation_categories: tuple[int, ...] = (
Categories.moderators,
Categories.modmail,
Categories.new_modmail,
Categories.logs,
Categories.appeals,
Categories.appeals_2
)
moderation_channels: tuple[int, ...] = (Channels.admins, Channels.admin_spam, Channels.mods)
modlog_blacklist: tuple[int, ...] = (
Expand Down
5 changes: 1 addition & 4 deletions bot/exts/info/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ async def on_message(self, message: Message) -> None:
if message.guild.id != Guild.id:
return

if (
is_in_category(message.channel, Categories.modmail)
or is_in_category(message.channel, Categories.new_modmail)
):
if is_in_category(message.channel, Categories.modmail):
if message.channel.id != Channels.incidents:
# Do not report modmail channels to stats, there are too many
# of them for interesting statistics to be drawn out of this.
Expand Down
5 changes: 1 addition & 4 deletions bot/exts/moderation/infraction/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,7 @@ async def post_infraction(

current_time = arrow.utcnow()

if any(
is_in_category(ctx.channel, category)
for category in (Categories.modmail, Categories.appeals, Categories.appeals_2)
):
if is_in_category(ctx.channel, Categories.modmail):
jump_url = None
else:
jump_url = await get_invocation_jump_url(ctx)
Expand Down
5 changes: 1 addition & 4 deletions bot/exts/moderation/infraction/management.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,7 @@ async def infraction_edit(
user_text = f"<@{user_id}>"
thumbnail = None

if any(
is_in_category(ctx.channel, category)
for category in (Categories.modmail, Categories.appeals, Categories.appeals_2)
):
if is_in_category(ctx.channel, Categories.modmail):
jump_url = "(Infraction edited in a ModMail channel.)"
else:
# `ctx.send` may be replaced with a no-op (e.g. by cleanban), so don't use the confirmation message.
Expand Down
Loading