示例#1
0
async def revoke_pm_block(_client, message):
    if message.chat.type == 'private':
        del_whitelist(message.chat.id)
    else:
        if message.reply_to_message:
            del_whitelist(message.reply_to_message.from_user.id)
        else:
            message.delete()
            return
    await message.edit("**PM permission was revoked!**")
    await asyncio.sleep(3)
    await message.delete()
示例#2
0
文件: pm.py 项目: yunosaint/Nana-Bot
async def revoke_pm_block(_client, message):
    del_whitelist(message.chat.id)
    await message.edit("`PM permission was revoked!`")
示例#3
0
async def revoke_pm_block(_client, message):
    del_whitelist(message.chat.id)
    await message.edit("**Sorry, but the owner revoked your permission from contacting them via PMs.**")