Browse Source

[commands] Fix message converter not inferring channel when missing

pull/7691/head
ChrisJL 3 years ago
committed by GitHub
parent
commit
68dbf0f882
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      discord/ext/commands/converter.py

2
discord/ext/commands/converter.py

@ -344,7 +344,7 @@ class PartialMessageConverter(Converter[discord.PartialMessage]):
if not match:
raise MessageNotFound(argument)
data = match.groupdict()
channel_id = discord.utils._get_as_snowflake(data, 'channel_id')
channel_id = discord.utils._get_as_snowflake(data, 'channel_id') or ctx.channel.id
message_id = int(data['message_id'])
guild_id = data.get('guild_id')
if guild_id is None:

Loading…
Cancel
Save