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)
|
slash = SlashCommand(jarvis, sync_commands=True, sync_on_cog_reload=True)
|
||||||
jarvis_self = Process()
|
jarvis_self = Process()
|
||||||
__version__ = "1.2.1"
|
__version__ = "1.2.2"
|
||||||
|
|
||||||
|
|
||||||
db = DBManager(get_config().mongo).mongo
|
db = DBManager(get_config().mongo).mongo
|
||||||
|
|
|
@ -11,8 +11,17 @@ from discord_slash.utils.manage_commands import create_choice, create_option
|
||||||
|
|
||||||
import jarvis
|
import jarvis
|
||||||
from jarvis.db import DBManager
|
from jarvis.db import DBManager
|
||||||
from jarvis.db.types import (Autopurge, Ban, Kick, Lock, Mute, Purge, Setting,
|
from jarvis.db.types import (
|
||||||
Unban, Warning)
|
Autopurge,
|
||||||
|
Ban,
|
||||||
|
Kick,
|
||||||
|
Lock,
|
||||||
|
Mute,
|
||||||
|
Purge,
|
||||||
|
Setting,
|
||||||
|
Unban,
|
||||||
|
Warning,
|
||||||
|
)
|
||||||
from jarvis.utils import build_embed
|
from jarvis.utils import build_embed
|
||||||
from jarvis.utils.field import Field
|
from jarvis.utils.field import Field
|
||||||
from jarvis.utils.permissions import admin_or_permissions
|
from jarvis.utils.permissions import admin_or_permissions
|
||||||
|
@ -832,7 +841,7 @@ class AdminCog(commands.Cog):
|
||||||
|
|
||||||
total = len(warnings)
|
total = len(warnings)
|
||||||
fields = [
|
fields = [
|
||||||
Field(f"{n_active} Active", "\n".join(active)),
|
Field(f"{n_active} Active", "\n".join(active), False),
|
||||||
Field("Total", total),
|
Field("Total", total),
|
||||||
]
|
]
|
||||||
embed = build_embed(
|
embed = build_embed(
|
||||||
|
@ -845,7 +854,7 @@ class AdminCog(commands.Cog):
|
||||||
icon_url=user.avatar_url,
|
icon_url=user.avatar_url,
|
||||||
)
|
)
|
||||||
embed.set_footer(text=f"{user.name}#{user.discriminator} | {user.id}")
|
embed.set_footer(text=f"{user.name}#{user.discriminator} | {user.id}")
|
||||||
|
embed.set_thumbnail(url=user.avatar_url)
|
||||||
await ctx.send(embed=embed)
|
await ctx.send(embed=embed)
|
||||||
|
|
||||||
@cog_ext.cog_subcommand(
|
@cog_ext.cog_subcommand(
|
||||||
|
|
Loading…
Add table
Reference in a new issue