fix(moderation): make inline default to a pagesize of 6
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 53s
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 53s
This commit is contained in:
parent
47d359718c
commit
b27397c040
1 changed files with 7 additions and 1 deletions
|
@ -822,7 +822,7 @@ class Moderation(commands.Cog):
|
||||||
await self.log(interaction, moderation_id)
|
await self.log(interaction, moderation_id)
|
||||||
|
|
||||||
@app_commands.command(name="history")
|
@app_commands.command(name="history")
|
||||||
async def history(self, interaction: discord.Interaction, target: discord.User = None, moderator: discord.User = None, pagesize: app_commands.Range[int, 1, 25] = 5, page: int = 1, ephemeral: bool = False, inline: bool = False, export: bool = False):
|
async def history(self, interaction: discord.Interaction, target: discord.User = None, moderator: discord.User = None, pagesize: app_commands.Range[int, 1, 25] = None, page: int = 1, ephemeral: bool = False, inline: bool = False, export: bool = False):
|
||||||
"""List previous infractions.
|
"""List previous infractions.
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
|
@ -851,6 +851,12 @@ class Moderation(commands.Cog):
|
||||||
database = await self.connect()
|
database = await self.connect()
|
||||||
cursor = database.cursor()
|
cursor = database.cursor()
|
||||||
|
|
||||||
|
if pagesize is None:
|
||||||
|
if inline is True:
|
||||||
|
pagesize = 6
|
||||||
|
else:
|
||||||
|
pagesize = 5
|
||||||
|
|
||||||
if target:
|
if target:
|
||||||
query = """SELECT *
|
query = """SELECT *
|
||||||
FROM moderation_%s
|
FROM moderation_%s
|
||||||
|
|
Loading…
Reference in a new issue