mirror of
https://github.com/hencaric/SCNewsBot.git
synced 2026-08-17 06:56:03 +01:00
initial commit
This commit is contained in:
22
scnewsbot/bot.py
Normal file
22
scnewsbot/bot.py
Normal file
@@ -0,0 +1,22 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user