import discord
from discord.ext import commands
from script import settings
prefix = settings['PREFIX']
client = commands.Bot(command_prefix = settings['PREFIX'])
client.remove_command('help')
#List
hello_words = ['{}Hello!','{}Hello','{}hello','{}hello!','{}Привет!','{}Привет','{}привет','{}привет!'.format(prefix)]
@client.event
#start bot
async def on_ready():
print('bot connected')
@client.event
#auto msg
async def on_message(message):
msg = message.content.lower()
if msg in hello_words:
await message.channel.send(f'Приветики!, {message.author.mention}')
#help
async def help(ctx):
emb = discord.Embed(title="Помошь", description = "Мои команды", colour=discord.Color.blue())
emb.set.author(name = ctx.author.name, icon_url = ctx.author.avatar_url)
emb.add_field(value = f'`{prefix}ping `{prefix}vk` `{prefix}instagram')
emb.set_thumbnail(url=client.user.avatar_url)
emb.set_footer( icon_url = client.user.avatar_url, text = f"{settings['OWNER NAME']} ©" )
await ctx.send(embed=emb)
client.run('токен')
from discord.ext import commands
hello_words = ['привет', 'hello', 'прив']
@commands.command(name=hello_words[0], aliases=hello_words[1:])
async def hello_command(ctx):
pass #делаешь что хочешь