-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
36 lines (25 loc) · 889 Bytes
/
main.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
import os
import discord
from discord.ext import commands
from dotenv import load_dotenv
load_dotenv()
class PiBot(commands.Bot):
def __init__(self):
intents = discord.Intents.default()
super().__init__(
command_prefix='pi.',
case_insensitive=True,
fetch_offline_members=False,
allowed_mentions=discord.AllowedMentions(everyone=False, roles=False, users=False),
intents=intents
)
self.load_extension('cogs.pi')
self.load_extension('cogs.pi_music')
with open('cogs/ressources/pi.txt', 'r') as f:
self.pi = f.read()
async def on_ready(self):
print("Logged in as : ", self.user.name)
print("ID : ", self.user.id)
def run(self, token, test_version=False):
super().run(token, reconnect=True)
PiBot().run(os.getenv('PI_TOKEN'))