1
Fork 0
mirror of https://github.com/wlinator/luminara.git synced 2024-10-02 18:03:12 +00:00

Add themes to all embeds

This commit is contained in:
wlinator 2024-08-29 09:42:47 -04:00
parent 3283304148
commit 3a336aed19
4 changed files with 10 additions and 0 deletions

View file

@ -20,6 +20,7 @@ class Sql(commands.Cog):
try:
results = database.select_query(f"SELECT {query}")
embed = Builder.create_embed(
theme="success",
user_name=ctx.author.name,
author_text=CONST.STRINGS["admin_sql_select_title"],
description=CONST.STRINGS["admin_sql_select_description"].format(
@ -30,6 +31,7 @@ class Sql(commands.Cog):
)
except mysql.connector.Error as error:
embed = Builder.create_embed(
theme="error",
user_name=ctx.author.name,
author_text=CONST.STRINGS["admin_sql_select_error_title"],
description=CONST.STRINGS["admin_sql_select_error_description"].format(
@ -47,6 +49,7 @@ class Sql(commands.Cog):
try:
database.execute_query(query)
embed = Builder.create_embed(
theme="success",
user_name=ctx.author.name,
author_text=CONST.STRINGS["admin_sql_inject_title"],
description=CONST.STRINGS["admin_sql_inject_description"].format(
@ -56,6 +59,7 @@ class Sql(commands.Cog):
)
except mysql.connector.Error as error:
embed = Builder.create_embed(
theme="error",
user_name=ctx.author.name,
author_text=CONST.STRINGS["admin_sql_inject_error_title"],
description=CONST.STRINGS["admin_sql_inject_error_description"].format(

View file

@ -20,6 +20,7 @@ case_service = CaseService()
def create_no_cases_embed(ctx: commands.Context[commands.Bot], author_text: str, description: str) -> discord.Embed:
return Builder.create_embed(
theme="info",
user_name=ctx.author.name,
author_text=author_text,
description=description,
@ -151,6 +152,7 @@ class Cases(commands.Cog):
)
embed = Builder.create_embed(
theme="success",
user_name=ctx.author.name,
author_text=CONST.STRINGS["case_reason_update_author"],
description=CONST.STRINGS["case_reason_update_description"].format(

View file

@ -28,6 +28,7 @@ class Warn(commands.Cog):
dm_task = target.send(
embed=Builder.create_embed(
theme="info",
user_name=target.name,
author_text=CONST.STRINGS["mod_warned_author"],
description=CONST.STRINGS["mod_warn_dm"].format(
@ -41,6 +42,7 @@ class Warn(commands.Cog):
respond_task = ctx.send(
embed=Builder.create_embed(
theme="success",
user_name=ctx.author.name,
author_text=CONST.STRINGS["mod_warned_author"],
description=CONST.STRINGS["mod_warned_user"].format(target.name),

View file

@ -19,6 +19,7 @@ def create_case_embed(
duration: int | None = None,
) -> discord.Embed:
embed: discord.Embed = Builder.create_embed(
theme="info",
user_name=ctx.author.name,
author_text=CONST.STRINGS["case_new_case_author"],
thumbnail_url=target.display_avatar.url,
@ -80,6 +81,7 @@ def create_case_list_embed(
author_text: str,
) -> discord.Embed:
embed: discord.Embed = Builder.create_embed(
theme="info",
user_name=ctx.author.name,
author_text=author_text,
hide_name_in_description=True,