Skip to content

Tag: discord.py

Changing color of a discord role

Everything is set up right, the bot is in the discord, connected, etc. This code: Gives this error: If anyone can find where I went wrong or any errors I’ve made, please help! Answer I would use the discord.Color.random() function for that as it looks like the problem occurs in your color-line. Re-write…

Check if A role has perms – Discord.py

Here Is a Good question. I want to check all roles in a server for admin, then create a new channel and allow only those set roles to have access. I dont want to use @commands.has_guild_permissions(). Answer If by roles with admin you mean any role that has the Administrator permission on (not just the server…

How to delete mp3 file after the bot played it

I am trying to create a music bot and now I want the bot to delete the current playing song after it finished playing. There’s my code: It’s saving the files to a folder called “music_files” with the format videoid.mp3 I noticed that it’s logging something in the cmd when logging…