Skip to content

Commit a3edc42

Browse files
committed
Allow mention command to accept ids/names, resolve #2796
1 parent 1aa7dfc commit a3edc42

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cogs/utility.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ async def ping(self, ctx):
638638

639639
@commands.command()
640640
@checks.has_permissions(PermissionLevel.ADMINISTRATOR)
641-
async def mention(self, ctx, *, mention: str = None):
641+
async def mention(self, ctx, *mention: Union[discord.Role, discord.Member]):
642642
"""
643643
Change what the bot mentions at the start of each thread.
644644
@@ -647,11 +647,12 @@ async def mention(self, ctx, *, mention: str = None):
647647
# TODO: ability to disable mention.
648648
current = self.bot.config["mention"]
649649

650-
if mention is None:
650+
if not mention:
651651
embed = discord.Embed(
652652
title="Current mention:", color=self.bot.main_color, description=str(current)
653653
)
654654
else:
655+
mention = " ".join(i.mention for i in mention)
655656
embed = discord.Embed(
656657
title="Changed mention!",
657658
description=f'On thread creation the bot now says "{mention}".',

0 commit comments

Comments
 (0)