Skip to content

Commit a6bef2e

Browse files
committed
black formatting
1 parent 71bf970 commit a6bef2e

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

cogs/modmail.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,9 +1121,10 @@ async def anonadduser(self, ctx, *users_arg: Union[discord.Member, discord.Role,
11211121

11221122
tag = self.bot.config["mod_tag"]
11231123
if tag is None:
1124-
top_role = get_top_role(ctx.author, self.bot.config["use_hoisted_top_role"])
1125-
tag = str(top_role) if top_role else None
1126-
name = self.bot.config["anon_username"] or tag or "Anonymous"
1124+
tag = str(get_top_role(ctx.author, self.bot.config["use_hoisted_top_role"]))
1125+
name = self.bot.config["anon_username"]
1126+
if name is None:
1127+
name = "Anonymous"
11271128
avatar_url = self.bot.config["anon_avatar_url"]
11281129
if avatar_url is None:
11291130
avatar_url = self.bot.get_guild_icon(guild=ctx.guild, size=128)
@@ -1211,9 +1212,10 @@ async def anonremoveuser(self, ctx, *users_arg: Union[discord.Member, discord.Ro
12111212

12121213
tag = self.bot.config["mod_tag"]
12131214
if tag is None:
1214-
top_role = get_top_role(ctx.author, self.bot.config["use_hoisted_top_role"])
1215-
tag = str(top_role) if top_role else None
1216-
name = self.bot.config["anon_username"] or tag or "Anonymous"
1215+
tag = str(get_top_role(ctx.author, self.bot.config["use_hoisted_top_role"]))
1216+
name = self.bot.config["anon_username"]
1217+
if name is None:
1218+
name = "Anonymous"
12171219
avatar_url = self.bot.config["anon_avatar_url"]
12181220
if avatar_url is None:
12191221
avatar_url = self.bot.get_guild_icon(guild=ctx.guild, size=128)

core/thread.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,9 +1652,10 @@ async def send(
16521652
# Anonymously sending to the user.
16531653
tag = self.bot.config["mod_tag"]
16541654
if tag is None:
1655-
top_role = get_top_role(author, self.bot.config["use_hoisted_top_role"])
1656-
tag = str(top_role) if top_role else None
1657-
name = self.bot.config["anon_username"] or tag or "Anonymous"
1655+
tag = str(get_top_role(author, self.bot.config["use_hoisted_top_role"]))
1656+
name = self.bot.config["anon_username"]
1657+
if name is None:
1658+
name = "Anonymous"
16581659
avatar_url = self.bot.config["anon_avatar_url"]
16591660
if avatar_url is None:
16601661
avatar_url = self.bot.get_guild_icon(guild=self.bot.guild, size=128)

0 commit comments

Comments
 (0)