You can simply pass the role as an argument
async def lockdown(self, ctx, role: discord.Role): # `RoleConverter` will automatically convert it to a `discord.Role` instance
await ctx.channel.set_permissions(role, send_messages=False)
await ctx.send(ctx.channel.mention + " ***is now in lockdown.***")
You can invoke it by mentioning the role, by putting the role ID or simply by passing the name of the role
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…