-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_server.py
40 lines (20 loc) · 832 Bytes
/
run_server.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
36
37
38
39
40
import discord
import asyncio
import fisbot
from fisbot import FisBotServer
import logging
handler = logging.FileHandler(filename='discord.log', encoding='utf-8', mode='w')
logging.basicConfig(filename="fisbot.log", encoding="utf-8", filemode="w")
BOT_PATH =''
intents = discord.Intents.all()
with open(BOT_PATH + "owner_id.txt", "r") as owner_file:
me_id = int(owner_file.read())
with open(BOT_PATH + "token.txt", "r") as token_file:
token = str(token_file.read())
bot = FisBotServer(command_prefix='.', path=BOT_PATH, owner_id=me_id, intents=intents)
async def activate_extensions():
await bot.activate_extensions()
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(activate_extensions())
bot.run(token, log_handler=handler, log_level=logging.DEBUG)