-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbot.py
More file actions
27 lines (22 loc) · 1.24 KB
/
bot.py
File metadata and controls
27 lines (22 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from modules import *
bot = commands.Bot(command_prefix=prefix, help_command=None)
bot.add_cog(functions.Bot(bot))
@bot.event
async def on_ready():
print('Logged in as:\n{0.user.name}\n{0.user.id}'.format(bot))
channel = bot.get_channel(int(786919558522994716))
embed = discord.Embed(colour=0xe6002e, title='sys.INFO', description=f'```yml\n{bot.user.name} запустился!\n```')
await channel.send(embed=embed)
@bot.event
async def on_command_error(ctx, error):
if isinstance(error, CommandNotFound):
#print(bot.user.avatar_url())
await ctx.send(embed = discord.Embed(colour=0xe6002e, title='sys.INFO', description = f'** {ctx.author.name}, данной команды не существует.\n'
f'Для получения справки по командам введите: ```diff\n!help```**'))
#raise error
@bot.event
async def on_member_join(member):
"""Ввывод информации об выходе пользователя."""
await member.send(f'Добро пожаловать {member}! Напиши !help чтобы узнать мои команды.')
#bot.run(config['token'])
bot.run(token)