1
Fork 0
mirror of https://github.com/wlinator/luminara.git synced 2024-10-02 22:23:13 +00:00
Lumi/lib/embeds/greet.py
wlinator 134657a5f0 refactor: Improve error embed formatting
Refactor the error embeds in the `error.py` file to improve their formatting. The `description` field now uses multi-line strings for better readability. Additionally, the `set_footer` method has been updated to include appropriate icons and messages.
2024-07-15 08:36:18 -04:00

25 lines
640 B
Python

import discord
from config.parser import JsonCache
from lib import formatter
resources = JsonCache.read_json("art")
question_icon = resources["icons"]["question"]
exclaim_icon = resources["icons"]["exclaim"]
class Greet:
@staticmethod
def message(member, template=None):
embed = discord.Embed(
color=discord.Color.embed_background(),
description=f"_ _\n**Welcome** to **{member.guild.name}**",
)
if template:
embed.description += "↓↓↓\n" + formatter.template(template, member.name)
embed.set_thumbnail(url=member.display_avatar)
return embed