Skip to content
Advertisement

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

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 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.

Advertisement