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

31 lines
710 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,
2025-06-02 09:55:27 +02:00
//'intents' => Intents::getAllIntents(),
2025-06-02 10:12:27 +02:00
//'intents' => Intents::DIRECT_MESSAGES,
2025-06-02 10:28:31 +02:00
//'intents' => 2147486720,
'intents' => 53608447,
2025-05-03 11:09:41 +02:00
]);
require_once BOT_ROOT . '/Bootstrap/Events.php';
d()->on('init', static function (Discord $discord) {
debug('Bootstrapping Commands...');
require_once BOT_ROOT . '/Bootstrap/Commands.php';
});