-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusbot.py
41 lines (31 loc) · 976 Bytes
/
usbot.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
41
import logging
import random as r
import sys
import time
import traceback as tb
from typing import Optional
import discord
from discord.ext import commands
from dlogger import dlogger
logging.basicConfig(level=logging.INFO)
INTENTS = discord.Intents.default()
INTENTS.message_content = True
class UsBot(commands.Bot):
"""Discord-interacting UsBot class."""
def __init__(self, **kwargs):
self.updating = False
super().__init__(**kwargs, command_prefix=commands.when_mentioned_or('us.'))
async def setup_hook(self) -> None:
await self.load_extension('msgcog')
await self.load_extension('setupcog')
await self.load_extension('admincog')
await dlogger.setup(bot)
return await super().setup_hook()
async def on_ready(self):
print('reddy')
if __name__ == '__main__':
file = open('secret.txt')
secret = file.read()
file.close()
bot = UsBot(intents=INTENTS)
bot.run(secret)