nextcord

How to call a function in a cog from a view using Nextcord?

How to call a function in a cog from a view using Nextcord? Question: I have a Cog and a view in nextcord. I’m trying to call the function magic_function from my view, but I’ve found no way of achieving it. Do you know how is it possible ? Here is a simplification of the …

Total answers: 1

Intents not defined

Intents not defined Question: I used a code from a video to add slash commands to a discord bot through nextcord but I keep running into this issue where intents isn’t defined. from nextcord import Interaction, SlashOption, ChannelType from nextcord.abc import GuildChannel from nextcord.ext import commands import nextcord client = nextcord.Client(intents=intents) token = ‘hidden’ bot …

Total answers: 2

Slash commands don't disappearing (nextcord)

Slash commands don't disappearing (nextcord) Question: I’m developing a discord bot using nextcord. When i’m registering slash command and deleting it later, it’s also staying at discord command list. What can I do to delete non-existent slash commands or sync actual bot’s command list with discord? P.S. All of my commands are in different cogs …

Total answers: 2

Sending a normal message after a slash command is run

Sending a normal message after a slash command is run Question: Im trying to make my discord.py bot send a normal message after a user runs a certain slash command. Ive tried looking for others with this issue, but none of them are using nextcord. Im using nextcord, in a cog. Any help is appreciated. …

Total answers: 1

I am receiving the error "coroutine 'sleep' was never awaited" with asyncio & nextcord

I am receiving the error "coroutine 'sleep' was never awaited" with asyncio & nextcord Question: Im using asyncio.sleep() for many of my commands, but I am getting the error "coroutine ‘sleep’ was never awaited". I am using nextcord, by the way. Heres the code in case its useful: embed=nextcord.Embed(title=catName, url=catLink, color=0xcc7314) embed.set_image(url=catURL) embed.set_footer(text=f"Cat image posted …

Total answers: 1

Nextcord Slash Command Not Responding

Nextcord Slash Command Not Responding Question: I am trying to make a Discord bot with slash commands using Python’s nextcord module. My invite link uses both bot and applications.commands scopes. I’ve started with a ping command using examples I’ve found online. My code looks like this: import nextcord, os from dotenv import load_dotenv from nextcord.ext …

Total answers: 1

Why can't I add a nextcord slash command?

Why can't I add a nextcord slash command? Question: I am getting this error when trying to make a slash command: ` Ignoring exception in on_guild_available Traceback (most recent call last): File "/home/runner/Nextcord-First-bot/venv/lib/python3.8/site-packages/nextcord/client.py", line 499, in _run_event await coro(*args, **kwargs) File "/home/runner/Nextcord-First-bot/venv/lib/python3.8/site-packages/nextcord/client.py", line 2403, in on_guild_available await self.sync_application_commands( File "/home/runner/Nextcord-First-bot/venv/lib/python3.8/site-packages/nextcord/client.py", line 2186, in sync_application_commands await …

Total answers: 1

Beautiful Soup Error pulling back data | Discord.py

Beautiful Soup Error pulling back data | Discord.py Question: I am relatively new when it comes to BS4 but I am trying to create a discord bot that pulls back the information for this page but I am struggling with inputing the right data path. Currently when I run my command I am getting back …

Total answers: 2

discord.py/nextcord.py Reaction role with on_raw_reaction_add not working

discord.py/nextcord.py Reaction role with on_raw_reaction_add not working Question: I´ve been a long time trying to figure out why this isn´t working, the part that doesn´t work is where I get the role, but I can´t figure out why. Does anyone know? :c @client.event async def on_raw_reaction_add(payload): message_id = 999984925216358470 if message_id == payload.message_id: user = …

Total answers: 1