Answer the question
In order to leave comments, you need to log in
Why is Groovy not responding to bot messages (discord.py. )?
Groovy does not react in any way to bot messages in text chat. Let's say the bot writes "-stop", Groovy does not put a reaction on the message and does not stop the music. Groovy responds to my messages.
The bot is in voice chat, as it should be.
Here is the function code. Here the bot should enter the same voice chat as me and write "-stop" in a special text chat.
@client.event
async def on_voice_state_update(member: discord.Member, before: discord.VoiceState, after: discord.VoiceState):
global voice_client
if str(member).split('#')[1] == MY_ID and before.channel.id != after.channel.id:
try:
voice_client = await after.channel.connect()
except discord.ClientException:
if voice_client is not None:
await voice_client.disconnect()
voice_client = await after.channel.connect()
music_channel = client.get_channel(MUSIC_TEXT_CHANNEL_ID)
await music_channel.send('-stop')
Answer the question
In order to leave comments, you need to log in
Most likely, Groovy, when executing the on message event , checks whether the author of the message is a bot, if so, then ignores it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question