Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

channel lock command in discord.py

#lock command
@bot.command(help=" Use this command to lock a channel")
@commands.has_permissions(manage_channels=True)
async def lock(ctx):
    await ctx.channel.set_permissions(ctx.guild.default_role,send_messages=False)
    await ctx.send('**<:vf:947194381172084767> Channel has been locked**')
    await ctx.channel.purge(limit=2)
Source by github.com #
 
PREVIOUS NEXT
Tagged: #channel #lock #command
ADD COMMENT
Topic
Name
1+3 =