refactor(serverinfo): new info

Enhanced the server info embed with more detailed statistics and improved formatting. Updated help command to send responses in the channel when possible, with fallback to DMs if sending fails, and added error handling for users with DMs disabled. Made botinfo embed non-ephemeral and added a custom emoji to the description.
This commit is contained in:
neoarz
2025-10-09 22:56:43 -04:00
parent 0fe0f4550a
commit b06b0cdb66
3 changed files with 136 additions and 27 deletions

View File

@@ -112,7 +112,13 @@ class Help(commands.Cog, name="help"):
if context.interaction:
await context.interaction.response.send_message(embed=embed, ephemeral=True)
else:
await context.author.send(embed=embed)
try:
await context.send(embed=embed)
except (discord.Forbidden, discord.HTTPException):
try:
await context.author.send(embed=embed)
except discord.Forbidden:
pass # User has DMs disabled
return
category = category.lower()
@@ -125,7 +131,13 @@ class Help(commands.Cog, name="help"):
if context.interaction:
await context.interaction.response.send_message(embed=embed, ephemeral=True)
else:
await context.author.send(embed=embed)
try:
await context.send(embed=embed)
except (discord.Forbidden, discord.HTTPException):
try:
await context.author.send(embed=embed)
except discord.Forbidden:
pass
return
@@ -179,7 +191,13 @@ class Help(commands.Cog, name="help"):
if context.interaction:
await context.interaction.response.send_message(embed=embed, ephemeral=True)
else:
await context.author.send(embed=embed)
try:
await context.send(embed=embed)
except (discord.Forbidden, discord.HTTPException):
try:
await context.author.send(embed=embed)
except discord.Forbidden:
pass
return
embed = discord.Embed(
@@ -199,7 +217,13 @@ class Help(commands.Cog, name="help"):
if context.interaction:
await context.interaction.response.send_message(embed=embed, ephemeral=True)
else:
await context.author.send(embed=embed)
try:
await context.send(embed=embed)
except (discord.Forbidden, discord.HTTPException):
try:
await context.author.send(embed=embed)
except discord.Forbidden:
pass
async def setup(bot) -> None: