v3.2.1 — Fix relay issues: robust init, webhook fallback, debug command
Fixes: - _init() now always sets _ready event even on error (prevents permanent relay blockage if init fails) - Webhook method retries with cache refresh on stale/deleted webhooks - Falls back to embed mode if webhooks fail (permissions, etc.) - Empty content guard (prevents 400 errors on empty messages) - Fixed deprecated discord.Embed.Empty usage for discord.py 2.x - Prefix check now skips empty prefixes (prevents all-message block) - asyncio.ensure_future() instead of bot.loop.create_task() - Better error logging with exc_info for relay failures New: - [p]wh debug command — shows cog state, intents, permissions, webhook status, connected channels, and prefix diagnostics
This commit is contained in:
parent
56d5b11882
commit
a4f5265083
2 changed files with 1080 additions and 3 deletions
|
|
@ -261,8 +261,10 @@ def build_relay_embed(
|
|||
|
||||
em = discord.Embed(description=message.content or "*[no text]*", colour=colour, timestamp=message.created_at)
|
||||
em.set_author(name=message.author.display_name, icon_url=message.author.display_avatar.url)
|
||||
footer_icon = message.guild.icon.url if message.guild.icon else discord.Embed.Empty
|
||||
em.set_footer(text=f"🌐 {guild_label} • #{message.channel.name}", icon_url=footer_icon)
|
||||
if message.guild.icon:
|
||||
em.set_footer(text=f"🌐 {guild_label} • #{message.channel.name}", icon_url=message.guild.icon.url)
|
||||
else:
|
||||
em.set_footer(text=f"🌐 {guild_label} • #{message.channel.name}")
|
||||
|
||||
if message.attachments:
|
||||
img_set = False
|
||||
|
|
|
|||
1077
wormhole/wormhole.py
1077
wormhole/wormhole.py
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue