mirror of
https://github.com/hencaric/SCNewsBot.git
synced 2026-08-17 06:56:03 +01:00
23 lines
650 B
Python
23 lines
650 B
Python
from discord.ext import commands
|
|
import discord
|
|
from utils import Config
|
|
|
|
INTENTS = discord.Intents.default()
|
|
INTENTS.message_content = True
|
|
INTENTS.members = True
|
|
|
|
|
|
class Bot(commands.Bot):
|
|
def __init__(self, config: Config, /) -> None:
|
|
super().__init__(
|
|
intents=INTENTS,
|
|
command_prefix=commands.when_mentioned_or(config.prefix),
|
|
allowed_mentions=discord.AllowedMentions(everyone=False),
|
|
case_insensitive=True,
|
|
)
|
|
self.config = config
|
|
|
|
async def setup_hook(self) -> None:
|
|
for extension in self.config.extensions:
|
|
await self.load_extension(extension)
|