def afk_comeback_check(ev, message):
if message.guild:
pfx = await ev.bot.get_prefix(message)
if not message.content.startswith(pfx):
if not sigma_mention_check(message.content, ev.bot.user.id):
afk_data = await ev.db[ev.db.db_cfg.database]['AwayUsers'].find_one({'UserID': message.author.id})
if afk_data:
await ev.db[ev.db.db_cfg.database]['AwayUsers'].delete_one({'UserID': message.author.id})
response = discord.Embed(color=0x3B88C3, title='? I have removed your AFK status.')
removal = await message.channel.send(embed=response)
await asyncio.sleep(5)
try:
await removal.delete()
except discord.ClientException:
pass
评论列表
文章目录