I have a log channel set so if a user deletes a message, it gets sent to the channel so my moderators and myself can see deleted messages. I want to make it so this does not send an embed showcasing what my moderators or myself deleted to avoid clutter. Is there a way to do this? Answer You can
Tag: discord.py
How to make a sub command without trigger discord.ext.commands.errors.MissingRequiredArgument?
(This is my first post by the way <3) I am making a discord.py bot and I want a command that will either list warnings (warnings list ) for a user, clear warnings for a user (warnings clear ) or give a help message for the command (anything that does not fit the other two commands)! Here is the code:
I’m making a music bot with discord.py and I’m having some trouble with the play command
The bot has play command that does 3 things it joins the voice channel if it isn’t in the voice channel already, it plays songs(obviously) and it stores the songs in a dict called queues if the bot is already playing a song to then play it when the song ends. To do something like this you need the after
How can I NOT save an image in PIL?
I have seen only way to save all the images in PIL but i dont want to save them all. I’m making a discord bot to send the meme with the user profile picture in space. Using Visual Studio Code Any way i just save a pile of useless images in my laptop? i tried removing the save line as
How to iterate over a range and then append items from list to it?
Right now the for loop that adds reactions at the end of the message takes number_of_responses, which is what I want. But I would also like the e.add_field fields be added based on number_of_responses (along with the right emoji in the name field and then add items from the list answers to their values). Answer No need to loop over
discord.py – Getting Guild ID on ‘on_guild_join’ event
I’m working on a simple Discord Bot with Python. I just want to save guild id on a SQLite folder, I can’t get guild id. I’m new on that database things. Parameters on event doesn’t work like: Answer on_guild_join only has the parameter of Guild and not Context.
my leveling bot(discord) seems to gives a error Command raised an exception: AttributeError: ‘tuple’ object has no attribute ‘find_one’
My code: Connection to the db code: Error: Command raised an exception: AttributeError: ‘tuple’ object has no attribute ‘find_one’ Answer You should change the connection to the db code to:
When logging deleted messages, how can I log the deleted image attachments reliably?
So my current event listener will log deleted messages just fine, the problem I’m having right now is that if the message that was deleted has an image attachment to it, most of the time it won’t display properly because the image url cannot be accessed anymore. You will just see the discord loading image forever. I want to ask
Discord.py with threads, RuntimeError: Timeout context manager should be used inside a task
So I’m creating a discord bot that is constantly scraping a webpage, checking if the item is in stock. When the item becomes in stock, send a message in the chat. Since the scraping is in a constant loop, I figured I would put that in a thread, one for each page that needs to be scraped. The problem is
Have a search command on discord.py
would like to know if it’s possible to add a search command to my discord bot, I will basically use the command to find files inside a directory. For example there is a file named name.txt, and I could do /search nam and it would search for this file and output the name of similar files in the directory. Answer