aboutsummaryrefslogtreecommitdiff
path: root/main.py
blob: 9f713bf464f6aded291fa28f5ee3d89a0e91fc10 (plain) (blame)
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
32
33
34
35
36
37
import asyncio
import logging

from colorama import init as init_colorama

from bot import BedrockBot


def setup_logging():
	FORMAT = '%(asctime)s - [%(levelname)s]: %(message)s'
	DATE_FORMAT = '%d/%m/%Y (%H:%M:%S)'

	logger = logging.getLogger('discord')
	logger.setLevel(logging.INFO)

	file_handler = logging.FileHandler(filename='discord.log', mode='a', encoding='utf-8')
	file_handler.setFormatter(logging.Formatter(fmt=FORMAT, datefmt=DATE_FORMAT))
	file_handler.setLevel(logging.INFO)
	logger.addHandler(file_handler)

	console_handler = logging.StreamHandler()
	console_handler.setFormatter(logging.Formatter(fmt=FORMAT, datefmt=DATE_FORMAT))
	console_handler.setLevel(logging.WARNING)
	logger.addHandler(console_handler)

def run_bot():

	bot = BedrockBot()
	bot.run()

if __name__ == "__main__":
	
	init_colorama(autoreset=True)

	setup_logging()
	
	run_bot()
579186bc2a8df67aef96fea3d3b&follow=1'>Add !queuerandomidiot131-0/+44 2021-03-20remove embed from run rejection messageSkycloudd1-1/+1 2021-03-16hopefully fixed the ultraxd thingSkycloudd1-1/+1 2021-03-05Tabs to spacesMango0x451-526/+541 2021-03-05Educate new members on input rulesMango0x451-535/+526 2021-02-28Make !pending not max out at 200 runs per gamerandomidiot131-5/+16 2021-02-27Update aiohttp due to security vulnerabilityMango0x452-1/+2 2021-02-24Make !verified asynchronousAnInternetTroll2-38/+36 2021-02-20Add verified commandrandomidiot131-0/+45 2021-02-13Whitelist coop all bosses when rejecting spamMango0x451-1/+1 2021-02-13Remove useless importsMango0x454-6/+1 2021-02-13Add better spam preventionMango0x451-15/+22 2021-02-13Remove useless dependenciesMango0x451-10/+8