-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathbot.py
More file actions
25 lines (20 loc) · 830 Bytes
/
bot.py
File metadata and controls
25 lines (20 loc) · 830 Bytes
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
import logging
from typing import TYPE_CHECKING
from discord.ext import commands
if TYPE_CHECKING:
from pymongo import AsyncMongoClient
from pymongo.asynchronous.collection import AsyncCollection
from pymongo.asynchronous.database import AsyncDatabase
from utils.config import Config
class DiscordBot(commands.Bot):
def __init__(self, *args, **kwargs) -> None: # noqa: ANN002, ANN003
super().__init__(*args, **kwargs)
self.mongo_client: AsyncMongoClient
self.db: AsyncDatabase
self.link_collection: AsyncCollection
self.student_collection: AsyncCollection
self.anonban_collection: AsyncCollection
self.mute_collection: AsyncCollection
self.startTime: float
self.logger = logging.getLogger("discord.app")
self.config: Config