forked from blizzthewolf/SeaCogs
fix(moderation): history now properly utilizes the epheremal config option
This commit is contained in:
parent
28bcb48abc
commit
f6a915b030
1 changed files with 13 additions and 13 deletions
|
@ -920,15 +920,10 @@ class Moderation(commands.Cog):
|
||||||
Display infractions in a grid arrangement (does not look very good)
|
Display infractions in a grid arrangement (does not look very good)
|
||||||
export: bool
|
export: bool
|
||||||
Exports the server's entire moderation history to a JSON file"""
|
Exports the server's entire moderation history to a JSON file"""
|
||||||
await interaction.response.defer(ephemeral=ephemeral)
|
if ephemeral is None:
|
||||||
|
ephemeral = (await self.config.user(interaction.user).history_ephemeral()
|
||||||
permissions = self.check_permissions(interaction.client.user, ['embed_links'], interaction)
|
or await self.config.guild(interaction.guild).history_ephemeral()
|
||||||
if permissions:
|
or False)
|
||||||
await interaction.followup.send(f"I do not have the `{permissions}` permission, required for this action.", ephemeral=True)
|
|
||||||
return
|
|
||||||
|
|
||||||
database = await self.connect()
|
|
||||||
cursor = database.cursor()
|
|
||||||
|
|
||||||
if pagesize is None:
|
if pagesize is None:
|
||||||
if inline is True:
|
if inline is True:
|
||||||
|
@ -945,10 +940,15 @@ class Moderation(commands.Cog):
|
||||||
or await self.config.guild(interaction.guild).history_inline()
|
or await self.config.guild(interaction.guild).history_inline()
|
||||||
or False)
|
or False)
|
||||||
|
|
||||||
if ephemeral is None:
|
await interaction.response.defer(ephemeral=ephemeral)
|
||||||
ephemeral = (await self.config.user(interaction.user).history_ephemeral()
|
|
||||||
or await self.config.guild(interaction.guild).history_ephemeral()
|
permissions = self.check_permissions(interaction.client.user, ['embed_links'], interaction)
|
||||||
or False)
|
if permissions:
|
||||||
|
await interaction.followup.send(f"I do not have the `{permissions}` permission, required for this action.", ephemeral=True)
|
||||||
|
return
|
||||||
|
|
||||||
|
database = await self.connect()
|
||||||
|
cursor = database.cursor()
|
||||||
|
|
||||||
if target:
|
if target:
|
||||||
query = """SELECT *
|
query = """SELECT *
|
||||||
|
|
Loading…
Reference in a new issue