Skip to content

Ensure Embed description is not Embed.Empty before stripping #1036

@MarkKoz

Description

@MarkKoz

Sentry Issue: BOT-6K

It's a special value instead of simply an empty string, so trying to strip it may fail. Other code should also be reviewed to ensure it can't fail for similar reasons.

AttributeError: '_EmptyEmbed' object has no attribute 'strip'
  File "discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot/cogs/help_channels.py", line 719, in on_message_delete
    if not await self.is_empty(msg.channel):
  File "bot/cogs/help_channels.py", line 733, in is_empty
    return self.match_bot_embed(msg, AVAILABLE_MSG)
  File "bot/cogs/help_channels.py", line 443, in match_bot_embed
    return message.author == self.bot.user and embed.description.strip() == description.strip()

Unhandled exception in on_message_delete.

Metadata

Metadata

Assignees

Labels

a: help channelsRelated to the help channel systemp: 3 - lowLow Priorityt: bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions