Files
discord-bot/src/Bootstrap/Discord.php

28 lines
605 B
PHP
Raw Normal View History

2025-05-03 11:09:41 +02:00
<?php
use Core\Env;
use Discord\Discord;
use Discord\WebSockets\Intents;
use Bot\DiscordBot;
use Services\ReminderService;
use function Core\debug;
use function Core\discord as d;
Env::get()->remainderService = new ReminderService();
Env::get()->bot = DiscordBot::getInstance();
Env::get()->discord = new Discord([
'token' => Env::get()->TOKEN,
'intents' => Intents::getAllIntents(),
]);
require_once BOT_ROOT . '/Bootstrap/Events.php';
d()->on('init', static function (Discord $discord) {
debug('Bootstrapping Commands...');
require_once BOT_ROOT . '/Bootstrap/Commands.php';
});