Skip to content

Commit

Permalink
fix: unknown channel_id for ctx commands
Browse files Browse the repository at this point in the history
  • Loading branch information
solumath authored and 1ukastesar committed Nov 3, 2024
1 parent fd328ef commit 8d970bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion features/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class ContextMock:
message: disnake.Message

def __init__(self, bot: Rubbergod, arg):
self.channel = getattr(arg, "channel", bot.get_channel(arg.channel_id))
channel_id = getattr(arg, "channel_id", arg.channel.id)
self.channel = getattr(arg, "channel", bot.get_channel(channel_id))
if hasattr(arg, "author"):
self.author = arg.author
elif hasattr(arg, "member"):
Expand Down

0 comments on commit 8d970bb

Please sign in to comment.