diff options
| author | 2020-07-19 13:39:24 +0800 | |
|---|---|---|
| committer | 2020-07-19 13:39:24 +0800 | |
| commit | 010373673700f821b5860bd749f40fdf8d59d134 (patch) | |
| tree | 6434f2090aa9e6545e5827345d7e401865e7abd2 | |
| parent | Extract `send_denial` to a utility function (diff) | |
Fix incorrect typehint and shorten method name
| -rw-r--r-- | bot/cogs/reminders.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/cogs/reminders.py b/bot/cogs/reminders.py index f36b67f5a..d36494a69 100644 --- a/bot/cogs/reminders.py +++ b/bot/cogs/reminders.py @@ -120,7 +120,7 @@ class Reminders(Cog): else: return True, "" - def get_mentionables_from_ids(self, mention_ids: t.List[str]) -> t.Iterator[Mentionable]: + def get_mentionables(self, mention_ids: t.List[int]) -> t.Iterator[Mentionable]: """Converts Role and Member ids to their corresponding objects if possible.""" guild = self.bot.get_guild(Guild.id) for mention_id in mention_ids: @@ -182,7 +182,7 @@ class Reminders(Cog): ) additional_mentions = ' '.join( - mentionable.mention for mentionable in self.get_mentionables_from_ids(reminder["mentions"]) + mentionable.mention for mentionable in self.get_mentionables(reminder["mentions"]) ) await channel.send( @@ -295,7 +295,7 @@ class Reminders(Cog): mentions = ", ".join( # Both Role and User objects have the `name` attribute - mention.name for mention in self.get_mentionables_from_ids(mentions) + mention.name for mention in self.get_mentionables(mentions) ) mention_string = f"\n**Mentions:** {mentions}" if mentions else "" |