-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlauncher.py
35 lines (25 loc) · 864 Bytes
/
launcher.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
32
33
34
35
import configparser
import logging
import sys
from discord.ext import commands
from commands.other.help import CustomHelpCommand
from posts.post_history import PostHistory
config = configparser.RawConfigParser()
config.read('config.properties')
details_dict = dict(config.items('DEFAULT'))
token = details_dict.get('token')
prefix = details_dict.get('prefix')
logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)s %(message)s', stream=sys.stdout)
console = logging.StreamHandler()
console.setLevel(logging.INFO)
bot = commands.Bot(
case_insensitive=True,
command_prefix=prefix,
help_command=CustomHelpCommand(),
)
bot.load_extension('commands.nsfw._setup')
bot.load_extension('commands.nsfw.site._setup')
bot.load_extension('commands.other._setup')
PostHistory().add_bot(bot)
if __name__ == "__main__":
bot.run(token)