misc(pterodactyl): made achievement text bold

This commit is contained in:
Seaswimmer 2024-03-02 15:38:06 -05:00
parent 464483b4c9
commit 6cdab8363a
Signed by untrusted user: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -8,7 +8,7 @@ import aiohttp
import discord import discord
import websockets import websockets
from pydactyl import PterodactylClient from pydactyl import PterodactylClient
from redbot.core.utils.chat_formatting import pagify from redbot.core.utils.chat_formatting import bold, pagify
from pterodactyl.config import config from pterodactyl.config import config
from pterodactyl.logger import logger from pterodactyl.logger import logger
@ -244,7 +244,7 @@ async def generate_join_leave_embed(username: str, join: bool) -> discord.Embed:
async def generate_achievement_embed(username: str, achievement: str, challenge: bool) -> discord.Embed: async def generate_achievement_embed(username: str, achievement: str, challenge: bool) -> discord.Embed:
embed = discord.Embed() embed = discord.Embed()
embed.color = discord.Color.dark_purple() if challenge else discord.Color.brand_green() embed.color = discord.Color.dark_purple() if challenge else discord.Color.brand_green()
embed.description = f"{username} has {'completed the challenge' if challenge else 'made the advancement'} {achievement}" embed.description = f"{bold(username)} has {'completed the challenge' if challenge else 'made the advancement'} {bold(achievement)}"
info = await get_info(username) info = await get_info(username)
if info: if info:
embed.set_author(name=username, icon_url=info['data']['player']['avatar']) embed.set_author(name=username, icon_url=info['data']['player']['avatar'])