es.davy.ai

Preguntas y respuestas de programación confiables

¿Tienes una pregunta?

Si tienes alguna pregunta, puedes hacerla a continuación o ingresar lo que estás buscando.

Tag: DISCORD.PY

discord.py el complemento no se carga al iniciar

Entonces, mi código se ve así: main.py import (aquí están todas las importaciones requeridas) @bot.event async def on_ready(): print(‘———-‘) for filename in os.listdir(‘./cogs’): if filename.endswith(‘.py’): bot.load_extension(f’cogs.{filename[:-3]}’) bot.run(‘token’) music.py class Music(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command() async def join(self, ctx, *, channel: discord.VoiceChannel): (insertar el resto de los comandos . . . Read more

El bot de Discord.py no se conecta al VC.

Estoy intentando conectar mi bot al mismo canal de voz en el que se encuentra el autor del comando y reproducir un video de su elección. Sin embargo, al ejecutar el siguiente código: @bot.command(‘play’) async def unirse(ctx, search: str): vc = discord.utils.get(ctx.guild.channels, name=ctx.author.voice) voice = await vc.connect() FFMPEG_OPTIONS = {‘before_options’: . . . Read more

El bot de Discord.py envía un extraño texto con incrustación en lugar de la incrustación.

@bot.event async def on_message(message): embed = discord.Embed( title=”anything”, description=f”كت تويت : \n {message.content} \n ||@here||” ) if message.channel.id == 927235996158922802: channelO = await bot.fetch_channel(926945495413301290) await channelO.send(embed) En este código, el bot me envía este mensaje de texto <discord.embeds.embed object=”” at=”” 0x0000019e83e31d80=””> en lugar del embed. No hay errores.</discord.embeds.embed>