fix(moderation): check inline before checking pagesize
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 46s

This commit is contained in:
Seaswimmer 2023-12-15 10:13:40 -05:00
parent f6a915b030
commit e91cd10ce6
Signed by: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -925,6 +925,11 @@ class Moderation(commands.Cog):
or await self.config.guild(interaction.guild).history_ephemeral() or await self.config.guild(interaction.guild).history_ephemeral()
or False) or False)
if inline is None:
inline = (await self.config.user(interaction.user).history_inline()
or await self.config.guild(interaction.guild).history_inline()
or False)
if pagesize is None: if pagesize is None:
if inline is True: if inline is True:
pagesize = (await self.config.user(interaction.user).history_inline_pagesize() pagesize = (await self.config.user(interaction.user).history_inline_pagesize()
@ -933,12 +938,8 @@ class Moderation(commands.Cog):
else: else:
pagesize = (await self.config.user(interaction.user).history_pagesize() pagesize = (await self.config.user(interaction.user).history_pagesize()
or await self.config.guild(interaction.guild).history_pagesize() or await self.config.guild(interaction.guild).history_pagesize()
or 6) or 5)
if inline is None:
inline = (await self.config.user(interaction.user).history_inline()
or await self.config.guild(interaction.guild).history_inline()
or False)
await interaction.response.defer(ephemeral=ephemeral) await interaction.response.defer(ephemeral=ephemeral)