More logging
This commit is contained in:
parent
b0c461ab7d
commit
1225034f72
5 changed files with 35 additions and 3 deletions
|
@ -407,7 +407,7 @@ class Jarvis(Snake):
|
|||
url=after.jump_url,
|
||||
)
|
||||
embed.set_footer(
|
||||
text=f"{after.author.user.username}#{after.author.discriminator} | {after.author.id}"
|
||||
text=f"{after.author.username}#{after.author.discriminator} | {after.author.id}"
|
||||
)
|
||||
await channel.send(embed=embed)
|
||||
if not isinstance(after.channel, DMChannel) and not after.author.bot:
|
||||
|
@ -475,6 +475,9 @@ class Jarvis(Snake):
|
|||
url=message.jump_url,
|
||||
)
|
||||
embed.set_footer(
|
||||
text=f"{message.author.user.username}#{message.author.discriminator} | {message.author.id}"
|
||||
text=(
|
||||
f"{message.author.username}#{message.author.discriminator} | "
|
||||
f"{message.author.id}"
|
||||
)
|
||||
)
|
||||
await channel.send(embed=embed)
|
||||
|
|
|
@ -87,6 +87,9 @@ class WarningCog(ModcaseCog):
|
|||
.sort("created_at", -1)
|
||||
.to_list(None)
|
||||
)
|
||||
if len(warnings) == 0:
|
||||
await ctx.send("That user has no warnings.", ephemeral=True)
|
||||
return
|
||||
active_warns = get_all(warnings, active=True)
|
||||
|
||||
pages = []
|
||||
|
|
|
@ -88,8 +88,9 @@ class DevCog(Scale):
|
|||
title = attach.filename
|
||||
elif url.match(data):
|
||||
try:
|
||||
if await get_size(data) > MAX_FILESIZE:
|
||||
if (size := await get_size(data)) > MAX_FILESIZE:
|
||||
await ctx.send("Please hash files that are <= 5GB in size", ephemeral=True)
|
||||
self.logger.debug(f"Refused to hash file of size {convert_bytesize(size)}")
|
||||
return
|
||||
except Exception as e:
|
||||
await ctx.send(f"Failed to retrieve URL: ```\n{e}\n```", ephemeral=True)
|
||||
|
|
|
@ -277,6 +277,29 @@ class RemindmeCog(Scale):
|
|||
component.disabled = True
|
||||
await message.edit(components=components)
|
||||
|
||||
@slash_command(
|
||||
name="reminders",
|
||||
sub_cmd_name="fetch",
|
||||
sub_cmd_description="Fetch a reminder that failed to send",
|
||||
)
|
||||
@slash_option(
|
||||
name="id", description="ID of the reminder", opt_type=OptionTypes.STRING, required=True
|
||||
)
|
||||
async def _fetch(self, ctx: InteractionContext, id: str) -> None:
|
||||
reminder = await Reminder.find_one(q(id=id))
|
||||
if not reminder:
|
||||
await ctx.send(f"Reminder {id} does not exist")
|
||||
return
|
||||
|
||||
embed = build_embed(title="You have a reminder!", description=reminder.message, fields=[])
|
||||
embed.set_author(
|
||||
name=ctx.author.display_name + "#" + ctx.author.discriminator,
|
||||
icon_url=ctx.author.display_avatar,
|
||||
)
|
||||
|
||||
embed.set_thumbnail(url=ctx.author.display_avatar)
|
||||
await ctx.send(embed=embed, ephemeral=reminder.private)
|
||||
|
||||
|
||||
def setup(bot: Snake) -> None:
|
||||
"""Add RemindmeCog to J.A.R.V.I.S."""
|
||||
|
|
|
@ -81,6 +81,7 @@ class VerifyCog(Scale):
|
|||
components=components,
|
||||
)
|
||||
await response.context.message.delete(delay=5)
|
||||
self.logger.debug(f"User {ctx.author.id} verified successfully")
|
||||
else:
|
||||
await response.context.edit_origin(
|
||||
content=(
|
||||
|
@ -90,6 +91,7 @@ class VerifyCog(Scale):
|
|||
)
|
||||
except asyncio.TimeoutError:
|
||||
await message.delete(delay=30)
|
||||
self.logger.debug(f"User {ctx.author.id} failed to verify before timeout")
|
||||
|
||||
|
||||
def setup(bot: Snake) -> None:
|
||||
|
|
Loading…
Add table
Reference in a new issue