1
Fork 0
mirror of https://github.com/wlinator/luminara.git synced 2024-10-03 02:23:13 +00:00
Lumi/lib/embeds/boost.py

26 lines
791 B
Python
Raw Normal View History

2024-04-26 11:13:58 +00:00
import discord
import lib.formatter
from lib.constants import CONST
2024-04-26 11:13:58 +00:00
class Boost:
@staticmethod
def message(member, template=None, image_url=None):
2024-04-26 11:13:58 +00:00
embed = discord.Embed(
color=discord.Color.nitro_pink(),
title="New Booster",
description=f"Thanks for boosting, **{member.name}**!!"
2024-04-26 11:13:58 +00:00
)
if template:
# REPLACE
embed.description = lib.formatter.template(template, member.name)
embed.set_author(name=member.name, icon_url=member.display_avatar)
embed.set_image(url=image_url if image_url else CONST.BOOST_ICON)
2024-04-26 11:13:58 +00:00
embed.set_footer(text=f"Total server boosts: {member.guild.premium_subscription_count}",
icon_url=CONST.EXCLAIM_ICON)
2024-04-26 11:13:58 +00:00
return embed