fix(moderation): check inline before checking pagesize

This commit is contained in:
Seaswimmer 2023-12-15 10:13:40 -05:00
parent f6a915b030
commit e91cd10ce6
Signed by untrusted user: 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 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 inline is True:
pagesize = (await self.config.user(interaction.user).history_inline_pagesize()
@ -933,12 +938,8 @@ class Moderation(commands.Cog):
else:
pagesize = (await self.config.user(interaction.user).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)