Closed alkim0 closed 1 year ago
Hello! Thanks for the issue. If this is a general help question, for a faster response consider joining the official Discord Server
Else if you have an issue with the library please wait for someone to help you here.
get_context exists for these scenarios https://twitchio.dev/en/latest/exts/commands.html#twitchio.ext.commands.Bot.get_context
async def event_message(self, message: twitchio.Message):
if message.echo:
return
ctx: commands.Context = await self.get_context(message)
await ctx.reply("Hello this is a reply")
await self.handle_commands(message)
I must've missed that. Thanks!
As it is right now, the only way to use the reply functionality (without interacting directly with the websocket) is to use
ctx.reply
, but that's a problem when no context is constructed like in theevent_message
handler.May I suggest that the reply function be moved back to the
Messageable
class and the interface changed to look like:in which the
message
argument is the message we want to reply to. This would seem to solve the problem.Right now I'm manually creating a Context object and calling reply on that, but that seems a bit jank.