Refactor welcome message handling in the Autorole cog to enhance user experience. Implement dynamic embed creation for guild join events, including updated branding and links to the dashboard and support server. Improve error handling for direct messages and audit log access.
This commit is contained in:
@@ -99,25 +99,37 @@ Threads : {len(guild.threads)}
|
||||
await guild.chunk()
|
||||
|
||||
embed = discord.Embed(
|
||||
description=f"{ARROWRED} Prefix For This Server is `>`\n{ARROWRED} Get Started with `>help`\n{ARROWRED} For detailed guides, FAQ & information, visit our **[Support Server](https://discord.gg/hexahost)**",
|
||||
color=0xFF0000,
|
||||
title=f"{BRAND_NAME} joined the server",
|
||||
description=(
|
||||
f"**{BRAND_NAME}** is ready to use.\n\n"
|
||||
f"▸ Default prefix: `>`\n"
|
||||
f"▸ Get started with `>help` or type `/`\n"
|
||||
f"▸ Dashboard: **[bot.hexahost.de](https://bot.hexahost.de)**\n"
|
||||
f"▸ Support: **[discord.gg/hexahost](https://discord.gg/hexahost)**"
|
||||
),
|
||||
color=0xA348FF,
|
||||
)
|
||||
embed.set_author(
|
||||
name="Thanks for adding me!", icon_url=guild.me.display_avatar.url
|
||||
name=BRAND_NAME,
|
||||
icon_url=guild.me.display_avatar.url if guild.me else None,
|
||||
)
|
||||
embed.set_footer(
|
||||
text=f"Powered by {BRAND_NAME}™",
|
||||
)
|
||||
if guild.icon:
|
||||
embed.set_thumbnail(url=guild.icon.url)
|
||||
embed.set_footer(text=f"Powered by HexaHost · {BRAND_NAME}")
|
||||
if guild.me:
|
||||
embed.set_thumbnail(url=guild.me.display_avatar.url)
|
||||
|
||||
support = Button(
|
||||
label="Support",
|
||||
label="Support Server",
|
||||
style=discord.ButtonStyle.link,
|
||||
url=f"https://discord.gg/hexahost",
|
||||
url="https://discord.gg/hexahost",
|
||||
)
|
||||
dashboard = Button(
|
||||
label="Open Dashboard",
|
||||
style=discord.ButtonStyle.link,
|
||||
url="https://bot.hexahost.de",
|
||||
)
|
||||
|
||||
view = View()
|
||||
view.add_item(dashboard)
|
||||
view.add_item(support)
|
||||
channel = discord.utils.get(guild.text_channels, name="general")
|
||||
if not channel:
|
||||
|
||||
Reference in New Issue
Block a user