Relative Content

Tag Archive for pythondiscorddiscord.py

Get discord.py bot to leave voice channel if alone

I’ve been trying to get my music bot to leave a voice channel it’s in if it’s been alone for more than 5 seconds but can’t seem to get it to work. I’d appreciate any pointers toward the correct implementation.

How to see the difference between before.timeout and after.timeout in discord.py?

@bot.event async def on_member_update(before, after): print(before.timeout) print(after.timeout) if before.timeout != after.timeout: print(“Timeout status changed”) else: print(“No change”) This is my code, and I’ve been trying to detect changes in a user’s timeout status. When I try to print the two statements and check them side by side, I’m certain they are the same. However, when […]

How to get message of command used | discord.py

Мне необходимо создать кнопку, которая будет создавать ссылку на сообщение дискорд.
Это у меня реализовано в коде так:

Discord.Py Cogs And Slash Command

I’m trying to make a bot with moderation cog file. Firstly I added ban and unban but it is not working.
my files look like. I think files are in correct positions.

Discord Bot suddenly sending embedded activity

I’ve created a music bot in discord using the discord.py library, among others for music playback. It’s been working fine and I haven’t changed anything in my code but today, suddenly, whenever using a command, the bot sends an embedded activity shortly before doing whatever it’s supposed to do.
I’ve attached a screenshot to show this. Does anyone know what causes this? My bot doesn’t even have “Use embedded activites” enabled in its invite permissions.