Дискорд бот

Raih

Активный
Автор темы
392
29
Не работает комманда мута.

Код:
import discord
from discord.ext import commands
from discord.ext.commands import Bot
Bot = commands.Bot(command_prefix=">")
hello_words = ["привет всем", "qq", "qq all", "привет", "здарова", "всем привет", "хай", "hi"]
info_words = ["кто создатель", "обратная связь"]
bye_words = ["bb", "всем пока", "пока", "бб"]

client = discord.Client()

@client.event
async def on_ready():
    print('We have logged in as {0.user}'.format(client))

@client.event
async def on_message(message):
    if message.author == client.user:
        return

    msg = message.content.lower()
    msg_list = msg.split()

    #if (msg in hello_words) or len(list(set(msg_list+hello_words)))<len(msg_list) + len(hello_words):
    find_hello_words = False
    for item in hello_words:
        if msg.find(item)>=0:
            find_hello_words = True
    if(find_hello_words):
        await message.channel.send('Привет!')


    #if (msg in info_words) or len(list(set(msg_list+info_words)))<len(msg_list) + len(info_words):
    find_info_words = False
    for item in info_words:
        if msg.find(item)>=0:
            find_info_words = True
    if (find_info_words):
        await message.channel.send('Создал Бек!\nОбратная связь Бек#1337')

    find_bye_words = False
    for item in bye_words:
        if msg.find(item)>=0:
            find_bye_words = True
    if(find_bye_words):
        await message.channel.send('Пока!')

    # print(msg_list)
    # print(hello_words)
    # print(list(set(msg_list+hello_words)))
    # print(len(list(set(msg_list+hello_words))))


@Bot.command()
@commands.has_permissions(view_audit_log=True)
async def mute(ctx,member:discord.Member,time:int,reason):
    muterole = discord.untils.get(ctx.guild.roles,id=839952960175341638)
    emb = discord.Embed(title="Мут",color=0xff0000)
    emb.add_field(name='Модератор',value=ctx.message.author.mention,inline=False)
    emb.add_field(name='Нарушитель',value=member.mention,inline=False)
    emb.add_field(name='Причина',value=reason,inline=False)
    emb.add_field(name='Время',value=time,inline=False)
    await ctx.send(embed = emb)