STOP_CHANNEL = 0
CHANNEL_ID_STOP = None
@Client.command()
@commands.is_owner()
async def stop(ctx):
await ctx.message.delete()
await ctx.send("Чат приостановлен!")
global STOP_CHANNEL
STOP_CHANNEL = 1
global CHANNEL_ID_STOP
CHANNEL_ID_STOP = ctx.channel.id
@Client.command()
@commands.is_owner()
async def start(ctx):
await ctx.message.delete()
global STOP_CHANNEL
STOP_CHANNEL = 0
global CHANNEL_ID_STOP
CHANNEL_ID_STOP = ctx.channel.id
await ctx.send("Чат возобновил работу!")
@Client.event
async def on_message(message):
if STOP_CHANNEL:
if message.channel.id == CHANNEL_ID_STOP:
if message.author.id != 458244468240547842:
await message.delete()