“Comando de unsiding de canal em discord.py” Respostas de código

Purge Command 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

como fazer o comando desconectado no membro em 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 exclusão de canais múltiplos em 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 unsiding de canal em 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

Respostas semelhantes a “Comando de unsiding de canal em discord.py”

Perguntas semelhantes a “Comando de unsiding de canal em discord.py”

Mais respostas relacionadas para “Comando de unsiding de canal em discord.py” em Python

Procure respostas de código populares por idioma

Procurar outros idiomas de código