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 your code to the following: What did
Tag: discord.py
I can’t catch PageError exception from Wikipedia in discord.py
So, i’m making an Wikipedia cog for my discord.py bot and everything is ok if the commands are used as expected, but, if i type something wrong (like “rb!resumen sjsajsajsja”), an PageError exception appears and the code stops. I have tried so many things to catch the exception and send it to the channel or print it in the terminal,
discord.py bot sends message each and finishes only when sending each words
I’m new in this, it’s really annoying that the bot would send each bad word one by one until it finishes. Here’s the code. I’m trying to make the bot send all the bad words in one message and as in the code, the bot would send a message and mute, but it would repeat based on how many bad
Discord.py Stuck Trying to Loop Through Logs and Send to Server
I am trying to create a simple discord bot that parses a log file that is constantly being written to and sending the new lines to a discord channel I have on my server name logs. Parsing the file and printing the output is easy and works just fine. My problem is trying to incorporate it into discord. It seems
I would like to make a discord bot that sends a message when a member goes online but I can’t seem to make it work ? (python)
I would like to make it so when a member goes online my both will send a message in the server welcoming the member but I cannot find a way to do so if I could get the name of the user too it would help thank you. Here is my code that is not working Answer Here’s a snippet
Python~JSON error → json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I was working on my discord bot and found a api(named numapi) which i want to use, i made a prototype in my pc which was ↓↓↓↓ and it worked fine. But when i copied the same thing in my discord bot then it was not working. The code and error are as follows :- code error pls help me
Using MongoDB on Discord.py for scheduled tasks
Purpose I have some commands like temp-mute, temp-ban, and other commands that need to be done after commands execution, and I do need to schedule things like giveaways and trigger a function as soon as the subscription ends, from a command. What do I want? I want to store all my timings and things in MongoDB and then make it
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’s owner), then every time
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.basicConfig(level=logging.INFO) is added to the main.py file under the imports,
Discord.py WELCOMER – How to make a custom image for welcome messages
I’d like to add the “custom” image for new discord users in my server. Just like this: Click here for the image. This is what I have for now: Answer You need to use an image processing/manipulation library called pillow aka PIL. You’d have your default/template image, as you provided (without the user specific text). You’d then find the position