16,110 questions
0
votes
0
answers
12
views
Discord.py logging in multiple times when restarted
I'm working on a project that has a Discord client running in a background thread to listen to incoming messages. I noticed each time the client is stopped & restarted, it logs in 1 extra time, as ...
1
vote
1
answer
142
views
How do I fix this output <coroutine object TIMER at 0x000001941051A5A0> from the bot?
time_stamp = {
"stamp1": {
"INTV1" : 10
},
"stamp2": {
"INTV2" : 20
},
"stamp3": {
"INTV3" : ...
-1
votes
1
answer
117
views
on_member_join & on_member_remove event triggers are not working or showing errors
Everything else works, escept the member join and member leave event functions don't trigger at all once i have member join/leave. I have all intents turned on in my developer portal and i have the ...
1
vote
1
answer
83
views
Why doesn't my timeout command take time correctly?
I am trying to make a timeout command for my Discord bot, but I need help with parsing time.
The command is supposed to go like +timeout @member 2d 3h 40m but it just takes the 2d, times out the user ...
-1
votes
1
answer
60
views
How do you find the ID of a user who sends a slash command with code outside of that command?
I am looking to find the user ID of the user who uses a slash command with code that gets executed when clicking a button on said message. interaction.user.id gives me the id of the button clicker, ...
2
votes
1
answer
67
views
Translating bot.tree.commands
I saw this in several bots and I also wanted to test it on my own, that when bots had a simple bot.tree.command command such as /play, the further parameters of this command, i.e. description and its ...
0
votes
0
answers
82
views
Discord.py cogs not starting looping tasks
Recently transitioned functionality present in my main script to cogs, and the autolooping task just don't work. Figure I must be doing something wrong when compared to https://discordpy.readthedocs....
0
votes
1
answer
89
views
Discord music bot suddenly stops playing when close to the end of a song
I tested the bot by playing the song Yesterday. It suddenly stopped playing at 1:48 while the entire thing was 2:32. When it stops playing, if there iis another song in the queue it starts playing ...
0
votes
1
answer
66
views
How do I retrieve user (case sensitive)?
Say there is a user by the name of 'ABcDefghi'.
The following command will produce 'abcdefghi #1234567890'.
How can I have it detect casing and produce 'ABcDefghi #1234567890'?
@bot.command()
async ...
1
vote
1
answer
137
views
How to make a confirmation prompt with buttons with a discord bot in discord.py?
I have a few commands in my discord bot that I'd like to ask for confirmation before running. Something like this example:
@tree.command(name='test')
async def testCommand(interaction: discord....
0
votes
1
answer
76
views
Assistance for detecting when discord automod is activated (discord.py)
I have a automod setup on my discord server. I want to expand the automod on the discord, and I setup my bot to detected, yet I cannot find any sort of documentation. Or anything to detect the automod
...
1
vote
1
answer
40
views
Trying to get my discord bot to log a command and who has used it
Here is my code.
@bot.command()
async def ping(ctx)
embed = discord.Embed(title = "Bot Latency", description=f"Latency: {round(bot.latency * 1000)}ms")
await ctx.reply(...
0
votes
2
answers
41
views
Discord bot @on_message_delete caching messages
For some time now I have a problem with on_message_delete, when a message is deleted, on_message_delete is called, unless the message is not in the cache, i.e. it was sent, the bot was restarted and ...
2
votes
1
answer
75
views
Discord bot function failing
I'm rather new to coding but I've been following this tutorial to a t so far (https://www.youtube.com/watch?v=YD_N6Ffoojw) yet the discord bot I'm coding refuses to run? I thought I had finally ironed ...
0
votes
1
answer
133
views
discord.py buttons inside rich embed
i've researched far and wide and couldn't find any idea on how to make a discord embed (with buttons INSIDE the embed) like the exmaple below. I used a plugin called "View Raw" and saw that ...
0
votes
2
answers
69
views
Check if user input is in a list
I am trying to make a discord bot featuring diagnoses for mild illnesses.
I want the bot to send a message prompting the user to send symptoms and see if any match a list of symptoms for a specific ...
0
votes
1
answer
161
views
Why am I getting errors with discord.ActionRow in discord.py?
I'm trying to create a game using buttons in Discord with discord.py, and I'm using discord.ActionRow, but it's giving me errors. Here's the function for context:
async def create_game_board(self, ...
-1
votes
1
answer
49
views
Sending a discord message without needing to have any input in discord
I'm making an AI thing that uses voice to text and text to speech to communicate, and I thought it would be nice to give it access to Discord, just for fun, but I'm only finding how to send messages ...
0
votes
1
answer
162
views
Discord Music Bot FFMPEG Troubleshooting
I am trying to create a Python Cog for a Discord.py bot on Windows 10 that allows the bot to join a voice channel to play music or funny audio. It is just something for me and my friends to goof off ...
1
vote
4
answers
144
views
How do I get someone's specific Discord ID
I'm using Pycord to build a discord bot. I am trying to make it so if the user that is being banned equals a specific Discord ID, it will print: "Can not perform this action." What have I ...
0
votes
1
answer
61
views
why did the bot stop reacting to commands? (Discord)
I'm writing a Discord bot using discord.py, but it doesn't respond to commands. The bot starts up successfully, shows up on the network, and commands are loaded, but nothing happens when I type ...
0
votes
2
answers
59
views
Cant run discord commands made in python
I am writing a discord bot for the first time. I managed to debug a few things from the tutorial, like the fact that there is a new argument: intents, but when it came to creating commands I could not ...
1
vote
0
answers
94
views
How to Create discord bot commands from the server
I'm coding a discord bot in Python and I want to create custom commands on the server that can be created in the server, from what Ive researched, I need to add a dictonary for the values to be put ...
1
vote
1
answer
58
views
Custom wraps on discord command
I created a custom wraps like this
def addLogger(fn):
from functools import wraps
@wraps(fn)
async def add_logger(*args, **kwargs):
print(f"addLogger: About to run {fn....
-1
votes
1
answer
84
views
events Pin and Unpin discord.py
i have one problem with events on_message_pin and on_message_unpin, both events should be invoked when message is pinned or unpinned, but in my scritp this in no working. I have every intenses i need, ...