0
votes

I have already done that google assistant sends message to my text channel and I want that my other bot listen only to my google Assistant bot. I have found a way a little... tricky, by changing the method process_command() to avoid the return when the id of the message is from my google assistant.

I don't think that it is a good solution, and it would only work on my computer and it is working right now, another problem is that the bot must be in a voice channel to work. So I've been thinking, on the function on_message, with startswith("whatever character") to the message.content I can filter the messages of my bot and go directly to the function, but I need the parameter ctx that I don't know how to pass it because on_message the only parameter that it has is "message". How can I get the ctx from the function on_message? I'm open to new suggestion about how do it on another way.

1

1 Answers

1
votes

Use the get_context method

ctx = await bot.get_context(message) # or `client.get_context`

Reference: