“Comando de canal Unhiding en discord.py” Código de respuesta

PURGURGE COMANDO DISCORD.py

You can treat single argument callables (like int) like converters for the purpose of declaring arguments. I also changed your permissions check to be handled automatically by a commands.check

@bot.command(pass_context=True)
@commands.has_permissions(administrator=True)
async def clean(ctx, limit: int):
        await ctx.channel.purge(limit=limit)
        await ctx.send('Cleared by {}'.format(ctx.author.mention))
        await ctx.message.delete()

@clean.error
async def clear_error(ctx, error):
    if isinstance(error, commands.MissingPermissions):
        await ctx.send("You cant do that!")
Santino

Cómo hacer el comando de desconexión en el miembro en Discord Python

@client.command
async def leave(ctx, member : discord.Member):
    await discord.Member.disconnect()



 if msg.startswith("$kick."):
        users = message.guild.members
        count = 6
        name = ""
        while count < len(message.content):
            name = name + str(message.content[count])
            count = count + 1
        #till here we just got the name
        x = 0
        while x > id.member_count:
            if name == users[x]:
                leave('was kicked',user[x])
                break
Friendly Flatworm

Comando de eliminación de múltiples canales en discord.py

#channel delete
@bot.command(aliases=['chd'])
@commands.has_permissions(manage_channels=True)
async def chdel(ctx, *channels: discord.TextChannel):
    for ch in channels:
        await ch.delete()
        await ctx.send(f'**<:vf:947194381172084767>`{ch.name}` has been deleted**')
        await sleep(1)
Hunter 87

Comando de canal Unhiding en discord.py

#unhide channel
@bot.command(help=" Use this command to unhide a channel")
@commands.has_permissions(manage_channels=True)
async def unhide(ctx):
    await ctx.channel.set_permissions(ctx.guild.default_role,view_channel=True)
    await ctx.send('**<:vf:947194381172084767>This channel is visible to everyone**')
    await ctx.channel.purge(limit=2)
Hunter 87

Respuestas similares a “Comando de canal Unhiding en discord.py”

Preguntas similares a “Comando de canal Unhiding en discord.py”

Más respuestas relacionadas con “Comando de canal Unhiding en discord.py” en Python

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código