Adjust warnings embed to show avatar url as thumbnail
This commit is contained in:
parent
ffb045b197
commit
af0bd71d89
2 changed files with 14 additions and 5 deletions
|
@ -36,7 +36,7 @@ jarvis = commands.Bot(
|
|||
)
|
||||
slash = SlashCommand(jarvis, sync_commands=True, sync_on_cog_reload=True)
|
||||
jarvis_self = Process()
|
||||
__version__ = "1.2.1"
|
||||
__version__ = "1.2.2"
|
||||
|
||||
|
||||
db = DBManager(get_config().mongo).mongo
|
||||
|
|
|
@ -11,8 +11,17 @@ from discord_slash.utils.manage_commands import create_choice, create_option
|
|||
|
||||
import jarvis
|
||||
from jarvis.db import DBManager
|
||||
from jarvis.db.types import (Autopurge, Ban, Kick, Lock, Mute, Purge, Setting,
|
||||
Unban, Warning)
|
||||
from jarvis.db.types import (
|
||||
Autopurge,
|
||||
Ban,
|
||||
Kick,
|
||||
Lock,
|
||||
Mute,
|
||||
Purge,
|
||||
Setting,
|
||||
Unban,
|
||||
Warning,
|
||||
)
|
||||
from jarvis.utils import build_embed
|
||||
from jarvis.utils.field import Field
|
||||
from jarvis.utils.permissions import admin_or_permissions
|
||||
|
@ -832,7 +841,7 @@ class AdminCog(commands.Cog):
|
|||
|
||||
total = len(warnings)
|
||||
fields = [
|
||||
Field(f"{n_active} Active", "\n".join(active)),
|
||||
Field(f"{n_active} Active", "\n".join(active), False),
|
||||
Field("Total", total),
|
||||
]
|
||||
embed = build_embed(
|
||||
|
@ -845,7 +854,7 @@ class AdminCog(commands.Cog):
|
|||
icon_url=user.avatar_url,
|
||||
)
|
||||
embed.set_footer(text=f"{user.name}#{user.discriminator} | {user.id}")
|
||||
|
||||
embed.set_thumbnail(url=user.avatar_url)
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
@cog_ext.cog_subcommand(
|
||||
|
|
Loading…
Add table
Reference in a new issue