Questions tagged [disnake]
53 questions
0
votes
0 answers
How to play audio in python via youtube link (without downloading)
I'm trying to play the audio from the YouTube link on Discord, but nothing works. There are no errors.
Code for playback audio:
url = f"https://www.youtube.com/watch?v={video['id']}"
player = await…

Xpeawey
- 117
- 1
- 1
- 4
0
votes
1 answer
Function of modal works, but doesn't auto close
The embed goes to the right channel, the confirmation message works, and nothing shows up on console... but the modal has a error of "Something went wrong. Please try again" when pressing submit.
import disnake
from disnake.ext import commands
from…

CraftyTheHawk
- 11
- 2
0
votes
0 answers
Disnake test_guilds not working, registering still takes forever
from replit import db
from disnake.ext import commands
import disnake
command_sync_flags = commands.CommandSyncFlags.none()
command_sync_flags.sync_commands = True
client = commands.Bot(
command_prefix='!',
…

Chanson Guo
- 31
- 4
0
votes
1 answer
How to edit/delete slash command message after its buttons have been interacted with (discord py disnake api wrapper)
here's a mega simple coin flip example i made for this question is there any way to
-edit the original slash command message with the result of the coin flip to get rid of the buttons
-delete the original slash command message
class…

Dubstepaztec 35
- 25
- 5
0
votes
1 answer
How to edit a embed using message_id?
I am trying to make on reaction edit embed...
@bot.event
async def on_raw_reaction_add(payload):
channel = await bot.fetch_channel(payload.channel_id)
message = await channel.fetch_message(payload.message_id)
if payload.emoji.name == "✅":
…

CraftyTheHawk
- 11
- 2
0
votes
1 answer
Check if user reacted to specific message disnake
I wanted to know is there a way to send a message like: Only *user can react to this message
and save the message id to the json file. then if someone reacts to that specific message and the user is the user in the json file it does something. I'm…

SkyLi000
- 21
- 3
0
votes
1 answer
How to get slash command name using python for discord bot
Currently I am using on_message() for reading message.
So I would like to get the command name and call specific function based on command name.

nub_discordDev
- 31
- 3
0
votes
1 answer
disnake wait_for() make interaction echec
Basically the interaction is just an echec
my code:
import disnake
from disnake import Intents
from disnake.ext.commands import Context, Bot
bot = Bot(command_prefix='+', test_guilds=[1032280589031706706], help_command=None,…

majvax
- 1
- 1
0
votes
1 answer
Can't change timeout disnake.py
I write code in disnake.py. And I got a problem. The default timeout is 180, but I can't change it in any way. How do I get the select menu to work even after a bot restart? I will be very grateful
Code:
import disnake
from disnake.ext import…

Mr Wing
- 3
- 2
0
votes
0 answers
Log online users in a discord server
async def log_users():
while True:
with open("log.csv", "a") as f:
f.write(f"{len(client.users)}, {datetime.datetime.now().strftime('%H')}")
print(f"{len(client.users)},…
0
votes
1 answer
TypeError: 'property' object is not iterable; disnake discord python problem
I'm writing a discord bot for my server, one of the functions is to create a channel when a member joins "Join to create channel" channel and move that member to his channel. I've used tips from this question: Move member into voice channel…

mxasd
- 11
- 1
0
votes
0 answers
How to write a discord Auto-voice bot on python disnake?
I'm making a discord bot on python using disnake, but because I'm very new to this, I don't understand how to do what I want. The idea is to have one voice channel called "Create voice chat" and when user joines it, bot automatically creates new…

mxasd
- 11
- 1
0
votes
0 answers
How take text in field Disnake Embed
i have this code in my disnake project:
@bot.event
async def on_button_click(inter: disnake.MessageInteraction):
embedMessageText = inter.message.embeds[0]
embedFieldText = inter.message.embeds[0].content
And this code in…

Dima YaFlay
- 1
- 1
0
votes
1 answer
How do I display the model menu via the button?
I want to output the modal menu through the button and embed, but it gives an error that disnake did not understand the lable of the button, tell me how to fix and output the menu through the button. I also want to know how to add reactions to the…

LetsGo
- 31
- 3
0
votes
1 answer
How do I get the server name from the prompt string? discord.py
There was a need to get the name of the server from the line with the invitation link, where this invitation actually leads. I get this line from the form. I use the disnake library (fork discord.py , therefore, I indicated it, because there are…

Kovirum
- 3
- 1