Skip to content

Tag: discord

Clear reactions in setting time []

I want clear or disable reactions in setting time using I making poll command and wanna delete or disable(I dont know can I or not) reactions in setting time I have code like this I have my time time_plus and wanna do something when time invoke Answer You can use reaction.clear or reaction.remove to remove reaction from your message.

How do I check for required scopes in a discord bot user using Python?

I am making a discord API wrapper and I finally thought of embarking on commands. As most of you know, discord requires bots to have the application.commands scope for checking whether the bot user has permissions to receive application commands. I wanted to check if the bot had the setting enabled using Python, but it never seems to work. I

Bot Mentions

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

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 file EDIT: Idk if it changes something but I use Answer I tried your code and it works for me. Maybe

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 on_ready() works though, but I get a pyflakes SyntaxError for the d in the def on_message(message). View error message Can someone ctx commands not recognised

im fairly new to coding in general and recently started trying to code my own bot. Almost all of the tutorials i have seen use the ctx command however, whenever i use it i get this error: Here is part of my code that uses the ctx command. The aim is to get it to delete the last 3 messages