-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
bot.py
31 lines (27 loc) · 975 Bytes
/
bot.py
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
28
29
30
31
# Основной модуль DolboNet
# by Sergree
# https://github.com/sergree
import discord
from core.checking_client import CheckingClient
import config
from utils.tprint import log
import asyncio
log("Проверяю Discord токен...")
checking_client = CheckingClient(intents=discord.Intents.none())
login_successful = False
try:
checking_client.run(config.token)
login_successful = True
except discord.errors.LoginFailure:
log("НЕВЕРНЫЙ DISCORD ТОКЕН! Необходимо отредактировать файл config.py!")
if login_successful:
log("Discord токен проверен.")
asyncio.set_event_loop(asyncio.new_event_loop())
from core.main_client import MainClient
intents = discord.Intents.none()
intents.guilds = True
intents.guild_messages = True
intents.emojis = True
intents.message_content = True
main_client = MainClient(intents=intents)
main_client.run(config.token)