2024-04-26 11:13:58 +00:00
|
|
|
import discord
|
|
|
|
|
|
|
|
import lib.formatter
|
2024-07-12 17:42:06 +00:00
|
|
|
from lib.constants import CONST
|
2024-04-26 11:13:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Boost:
|
|
|
|
@staticmethod
|
2024-04-26 12:54:08 +00:00
|
|
|
def message(member, template=None, image_url=None):
|
2024-04-26 11:13:58 +00:00
|
|
|
embed = discord.Embed(
|
2024-04-26 11:22:17 +00:00
|
|
|
color=discord.Color.nitro_pink(),
|
2024-04-26 12:01:12 +00:00
|
|
|
title="New Booster",
|
2024-07-15 12:34:24 +00:00
|
|
|
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)
|
|
|
|
|
2024-04-26 12:01:12 +00:00
|
|
|
embed.set_author(name=member.name, icon_url=member.display_avatar)
|
2024-07-12 17:42:06 +00:00
|
|
|
embed.set_image(url=image_url if image_url else CONST.BOOST_ICON)
|
2024-07-15 12:34:24 +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
|