fix(aurora): fixed using interaction instead of passing a member/user object
All checks were successful
Pylint / Pylint (3.11) (push) Successful in 41s
All checks were successful
Pylint / Pylint (3.11) (push) Successful in 41s
This commit is contained in:
parent
eaf08f2e08
commit
a96f461a63
2 changed files with 15 additions and 13 deletions
|
@ -161,7 +161,7 @@ class Aurora(commands.Cog):
|
|||
silent = not await config.guild(interaction.guild).dm_users()
|
||||
if silent is False:
|
||||
try:
|
||||
embed = await embed_factory('message', await self.bot.get_embed_color(None), guild=interaction.guild, reason=reason, moderation_type='note', response=await interaction.original_response())
|
||||
embed = await embed_factory('message', await self.bot.get_embed_color(None), guild=interaction.guild, moderator=interaction.user, reason=reason, moderation_type='note', response=await interaction.original_response())
|
||||
await target.send(embed=embed)
|
||||
except discord.errors.HTTPException:
|
||||
pass
|
||||
|
@ -194,7 +194,7 @@ class Aurora(commands.Cog):
|
|||
silent = not await config.guild(interaction.guild).dm_users()
|
||||
if silent is False:
|
||||
try:
|
||||
embed = await embed_factory('message', await self.bot.get_embed_color(None), guild=interaction.guild, reason=reason, moderation_type='warned', response=await interaction.original_response())
|
||||
embed = await embed_factory('message', await self.bot.get_embed_color(None), guild=interaction.guild, moderator=interaction.user, reason=reason, moderation_type='warned', response=await interaction.original_response())
|
||||
await target.send(embed=embed)
|
||||
except discord.errors.HTTPException:
|
||||
pass
|
||||
|
@ -257,7 +257,7 @@ class Aurora(commands.Cog):
|
|||
silent = not await config.guild(interaction.guild).dm_users()
|
||||
if silent is False:
|
||||
try:
|
||||
embed = await embed_factory('message', await self.bot.get_embed_color(None), guild=interaction.guild, reason=reason, moderation_type='blacklisted', response=await interaction.original_response(), duration=matching_role['duration'])
|
||||
embed = await embed_factory('message', await self.bot.get_embed_color(None), guild=interaction.guild, moderator=interaction.user, reason=reason, moderation_type='blacklisted', response=await interaction.original_response(), duration=matching_role['duration'])
|
||||
await target.send(embed=embed)
|
||||
except discord.errors.HTTPException:
|
||||
pass
|
||||
|
@ -312,7 +312,7 @@ class Aurora(commands.Cog):
|
|||
silent = not await config.guild(interaction.guild).dm_users()
|
||||
if silent is False:
|
||||
try:
|
||||
embed = await embed_factory('message', await self.bot.get_embed_color(None), guild=interaction.guild, reason=reason, moderation_type='muted', response=await interaction.original_response(), duration=parsed_time)
|
||||
embed = await embed_factory('message', await self.bot.get_embed_color(None), guild=interaction.guild, moderator=interaction.user, reason=reason, moderation_type='muted', response=await interaction.original_response(), duration=parsed_time)
|
||||
await target.send(embed=embed)
|
||||
except discord.errors.HTTPException:
|
||||
pass
|
||||
|
@ -355,7 +355,7 @@ class Aurora(commands.Cog):
|
|||
silent = not await config.guild(interaction.guild).dm_users()
|
||||
if silent is False:
|
||||
try:
|
||||
embed = await embed_factory('message', await self.bot.get_embed_color(None), guild=interaction.guild, reason=reason, moderation_type='unmuted', response=await interaction.original_response())
|
||||
embed = await embed_factory('message', await self.bot.get_embed_color(None), guild=interaction.guild, moderator=interaction.user, reason=reason, moderation_type='unmuted', response=await interaction.original_response())
|
||||
await target.send(embed=embed)
|
||||
except discord.errors.HTTPException:
|
||||
pass
|
||||
|
@ -388,7 +388,7 @@ class Aurora(commands.Cog):
|
|||
silent = not await config.guild(interaction.guild).dm_users()
|
||||
if silent is False:
|
||||
try:
|
||||
embed = await embed_factory('message', await self.bot.get_embed_color(None), guild=interaction.guild, reason=reason, moderation_type='kicked', response=await interaction.original_response())
|
||||
embed = await embed_factory('message', await self.bot.get_embed_color(None), guild=interaction.guild, moderator=interaction.user, reason=reason, moderation_type='kicked', response=await interaction.original_response())
|
||||
await target.send(embed=embed)
|
||||
except discord.errors.HTTPException:
|
||||
pass
|
||||
|
@ -446,7 +446,7 @@ class Aurora(commands.Cog):
|
|||
await interaction.response.send_message(content=f"{target.mention} has been banned for {humanize.precisedelta(parsed_time)}!\n**Reason** - `{reason}`")
|
||||
|
||||
try:
|
||||
embed = await embed_factory('message', await self.bot.get_embed_color(None), guild=interaction.guild, reason=reason, moderation_type='tempbanned', response=await interaction.original_response(), duration=parsed_time)
|
||||
embed = await embed_factory('message', await self.bot.get_embed_color(None), guild=interaction.guild, moderator=interaction.user, reason=reason, moderation_type='tempbanned', response=await interaction.original_response(), duration=parsed_time)
|
||||
await target.send(embed=embed)
|
||||
except discord.errors.HTTPException:
|
||||
pass
|
||||
|
@ -466,7 +466,7 @@ class Aurora(commands.Cog):
|
|||
silent = not await config.guild(interaction.guild).dm_users()
|
||||
if silent is False:
|
||||
try:
|
||||
embed = embed = await embed_factory('message', await self.bot.get_embed_color(None), guild=interaction.guild, reason=reason, moderation_type='banned', response=await interaction.original_response())
|
||||
embed = embed = await embed_factory('message', await self.bot.get_embed_color(None), guild=interaction.guild, moderator=interaction.user, reason=reason, moderation_type='banned', response=await interaction.original_response())
|
||||
await target.send(embed=embed)
|
||||
except discord.errors.HTTPException:
|
||||
pass
|
||||
|
@ -513,7 +513,7 @@ class Aurora(commands.Cog):
|
|||
silent = not await config.guild(interaction.guild).dm_users()
|
||||
if silent is False:
|
||||
try:
|
||||
embed = await embed_factory('message', await self.bot.get_embed_color(None), guild=interaction.guild, reason=reason, moderation_type='unbanned', response=await interaction.original_response())
|
||||
embed = await embed_factory('message', await self.bot.get_embed_color(None), guild=interaction.guild, moderator=interaction.user, reason=reason, moderation_type='unbanned', response=await interaction.original_response())
|
||||
await target.send(embed=embed)
|
||||
except discord.errors.HTTPException:
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue