Nothing error, but the bot is not run. Answer
Tag: discord
Bot Mentions Discord.py
So I want my bot to respond to anyone who @mentions it. It does work as it should, but the only problem it’ll respond to @everyone and @here pings. It’s probably simple and I am overthinking it but I just want to know if there is any way to make the bot respond to messages it’s actually mentioned in, not
Why I can’t send messages in a @tasks.loop in discord.py?
I have a problem: I can’t send message in a @tasks.loop() function. When I try to get the channel object with self.client.get_channel(channlid), it return me a Nonetype variable. My code : my error: Can you help me ? Answer Problem You’re calling client.get_channel before the client is ready. So, the client cannot find the channel you’re looking for, and channel
Nextcord Slash Commands
I’ve heard that nextcord has now slash commands! That’s great, and this is why I want to add them in my bot. I’ve already watched YouTube tutorials, but, for some reason, it doesn’t work. This is my main.py file EDIT: Idk if it changes something but I use repl.it Answer I tried your code and it works for me. Maybe
result1 sends what’s in it weird (picture below)
Everything works fine, but now when the amount is sent it looks like this: when I try the {result1[1]}(where the money is at) the command doesn’t even work. What am I missing? Answer The tuple is of length 1, so you should be using {result1[0]} rather than {result1[1]}.
discord.py: too big variable?
I’m very new to python and programming in general, and I’m looking to make a discord bot that has a lot of hand-written chat lines to randomly pick from and send back to the user. Making a really huge variable full of a list of sentences seems like a bad idea. Is there a way that I can store the
How can I send a message to a user out of a JSON file?
Probably a very easy question to answer, but I want to send a message to a user after a certain time. For this I read his ID from a JSON. Problem with this? You cannot append a send to a str or this error is then spit out. I have already tried to convert the whole thing, but without success.
How to correctly make Create DM request in Discord API?
I am trying to create dm This code receives response with “400: Bad request” message. I’ve read this but I can’t find any examples of correct usage of this request. Answer I finally understood my mistake, I shouldn’t pass dictionary as data but should pass a str, so I changed data=data to data=json.dumps(data) and it worked
FIXED – on_message raising SyntaxError when called
This code normally works for me when I use it, but it stopped working. First with other async definitions, but now on_message isn’t working! WizBot is the name of my bot.Also if it is helpful, I am using repl.it. on_ready() works though, but I get a pyflakes SyntaxError for the d in the def on_message(message). View error message Can someone
discord.py avatar command bringing up error
I am running an avatar command which worked before, but every time I try to run it now it gives me the error : I feel I am doing something dumb, but what is going wrong? Here is the code: Thanks in advance for the help. Answer If you’ve updated your discord.py then avatar_url got replaced with avatar.url.