pull/176/head
Stijn De Clercq 2023-07-08 01:06:25 +02:00
parent e6a615cad5
commit d52c80aa8b
4 changed files with 4 additions and 4 deletions

View File

@ -69,7 +69,7 @@ class LinkCache(DatabaseCache):
self.clear() self.clear()
all_links = await links.get_all_links(database_session) all_links = await links.get_all_links(database_session)
self.data = list(map(lambda l: l.name, all_links)) self.data = list(map(lambda link: link.name, all_links))
self.data.sort() self.data.sort()
self.data_transformed = list(map(str.lower, self.data)) self.data_transformed = list(map(str.lower, self.data))

View File

@ -420,7 +420,7 @@ class Discord(commands.Cog):
if ctx.guild is None: if ctx.guild is None:
return await ctx.reply("Snipe only works in servers.", mention_author=False, ephemeral=True) return await ctx.reply("Snipe only works in servers.", mention_author=False, ephemeral=True)
sniped_data = self.client.sniped.get(ctx.channel.id, None) sniped_data = self.client.sniped.get(ctx.channel.id)
if sniped_data is None: if sniped_data is None:
return await ctx.reply( return await ctx.reply(
"There's no one to make fun of in this channel.", mention_author=False, ephemeral=True "There's no one to make fun of in this channel.", mention_author=False, ephemeral=True

View File

@ -225,7 +225,7 @@ class CustomHelpCommand(commands.MinimalHelpCommand):
def _get_flags_class(self, command: commands.Command) -> Optional[Type[PosixFlags]]: def _get_flags_class(self, command: commands.Command) -> Optional[Type[PosixFlags]]:
"""Check if a command has flags""" """Check if a command has flags"""
flag_param = command.params.get("flags", None) flag_param = command.params.get("flags")
if flag_param is None: if flag_param is None:
return None return None

View File

@ -374,7 +374,7 @@ class Didier(commands.Bot):
# If the edited message is currently present in the snipe cache, # If the edited message is currently present in the snipe cache,
# don't update the <before>, but instead change the <after> # don't update the <before>, but instead change the <after>
existing = self.sniped.get(before.channel.id, None) existing = self.sniped.get(before.channel.id)
if existing is not None and existing[0].id == before.id: if existing is not None and existing[0].id == before.id:
before = existing[0] before = existing[0]