379 questions
1
vote
1
answer
131
views
Py-cord RuntimeError: There is no current event loop in thread 'MainThread'
I've returned to a bot I created using the py-cord module several months ago, on a new device where I've reinstalled py-cord. The bot loaded fine when I was originally working on it, but now when I ...
3
votes
3
answers
234
views
I use bot commands in a DM with my bot but cannot use it in a group chat with other users
I'm trying to make a bot that could work in DMs on Discord.
@bot.command()
@commands.dm_only()
async def meow(ctx: discord.ApplicationContext):
log.info(f"{ctx.author} meows")
...
0
votes
1
answer
455
views
Bot gets "Unclosed connection" when joining a voice channel for the first time
I am building a Discord bot using py-cord.
When the bot tries to join a voice channel for the very first time in a server, I immediately get the following warning in the console:
Unclosed connection
...
-1
votes
1
answer
265
views
Does Py-cord support Discord's new User Install Commands feature? [closed]
I recently learned that Discord has updated with a feature called "User Install" that allows users to install bots to their personal accounts, not just servers. As I understand it, this ...
1
vote
4
answers
178
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
2
answers
519
views
How to Retrieve Profile Effect from the Discord User Object?
I want to retrieve the relatively new Profile Effect from a User, however it seems that the Profile Effect is not included in the User Object while the Avatar Decoration is.
I was unable to find any ...
-1
votes
1
answer
138
views
About import error by using py-cord and discord.py
I was coding by using py-cord and discord.py to make Discord Bot in Python. But there's problem. I was making embed and button logics but someone just push me using 'view' library from discord. so ...
0
votes
1
answer
568
views
Very simple slash command failing with "This interaction failed"
I'm trying to make a simple Discord bot with pycord that includes slash commands, after porting away from text-based commands.
I've made the below simple-as-possible code, yet every time I run the ...
-1
votes
1
answer
127
views
PyCord Slashcommands : AttributeError: type object 'Interaction' has no attribute 'respond'
Today I changed from PyCord 2.4.1 to 2.6.0 and my entire Bot broke.
I get the Error message:
Extension 'cogs.stats' raised an error: AttributeError: type object 'Interaction' has no attribute 'respond'...
1
vote
1
answer
137
views
How can I change the choices of an Option depending on the writer of the slash command in pycord?
I want to give different people different Options in a slash command. Person 1 should get Options 1 2 and 3 and Person 2 should get Options 4, 5 and 6.
async def do_stuff(ctx, opt: commands.Option(str,...
4
votes
1
answer
228
views
Pycord Unknown interaction
I'm trying to make a embed message with buttons. For support system but I'm getting Unknown interaction error. I added ephemeral=True to defer.
Also changed this:
interaction.response.send_messageto ...
-2
votes
1
answer
58
views
How do i make a word filter in pycord?
With my little knowledge on pycord, I tried to make a bot that deletes new messages with certain content but it did not work out.
@bot.event
async def on_message(ctx, message):
if message == "...
0
votes
1
answer
689
views
How to use Message Application Command (context menu command) in private dms. Pycord/discord.py
@commands.message_command(
name="Remind Me"
)
async def message_com(self, ctx, message):
view = util.reminderInteraction.ReminderSelectView(
self....
0
votes
2
answers
86
views
I need to import files while the program is running
I have a small discord bot where users can create their own python programs and the bot can store and execute them. But there is one problem: I need to import all the files into the main file by ...
-1
votes
1
answer
74
views
How to remove interaction error on pycord?
How fix error interaction? I asked ChatGPT, but he led me in circles.
My code:
import discord
import os
from discord.ext import commands
from dotenv import load_dotenv
load_dotenv()
intents = discord....