Skip to content
Advertisement

Tag: discord

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

discord.embed update with role reaction

I’m trying to update a discord.embed with reaction: I create a discord embed with some default information, and add the reaction I want to use, the idea is that when someone react with one of the select reaction, the name of the user is added to the field. ( I actually have 4 commands using the same “template” with the

How to tag a user using the discord.Member argument?

I have a discord bot with the command !sad. On execution the bot should reply with a random string from sad_list. I want the option to have the bot tag someone if you execute the command with the user: discord.Member argument. Preferred output: as opposed to only The following has already been tried: However this simply writes: As opposed to

Hosting discord bot through Heroku – deploy error

I am trying to host my discord bot through heroku. I’m coding with python. But I got the following error when deploying from GitHub: That was the full build log that I saw on heroku. Can anyone help? Thx Answer You should change the first line in requirements.txt to git+https://github.com/Rapptz/discord.py. Because there is no tag or branch named “rewrite”.

changing the embed’s footer

i have this code that would change an embed’s footer and resend it to the log channel, but now it doesn’t work anymore for somereason this is the code: and this is the error i get: Answer The argument for set_footer is keyword-only:

(discord.py) change discord avatar with someone’s avatar url

I’m trying to change my bot’s avatar with the avatar url of someone in my server. The code isn’t working. Any help? Answer The other answer says you have to have a bytes-like object, which is true. Adding onto it though: you can retrieve the image as a bytes-like object with requests like: img = requests.get(url).content which you can then

How to fix discord music bot attribute

Error: discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: ‘VoiceState’ object has no attribute ‘voice_channel’ Code: Answer Try using voice.channel instead of voice.voice_channel. Also client.join_voice_channel will not work. Use something like this:

Advertisement