25 lines
656 B
PHP
25 lines
656 B
PHP
<?php
|
|
|
|
use Analog\Analog;
|
|
use Analog\Handler\File;
|
|
|
|
require realpath(__DIR__ . '/../../vendor/autoload.php');
|
|
|
|
$dotenv = Dotenv\Dotenv::createImmutable(realpath(__DIR__ . '/../../'));
|
|
$dotenv->load();
|
|
|
|
$dotenv->required('BOT_AUTH_TOKEN')->notEmpty();
|
|
$dotenv->required('COMMAND_PREFIX')->notEmpty();
|
|
$dotenv->required('CAT_API_KEY')->notEmpty();
|
|
|
|
define('PROJECT_ROOT', realpath(__DIR__ . '/../../'));
|
|
|
|
if (!file_exists(PROJECT_ROOT . '/Storage/Logs/bot.log'))
|
|
{
|
|
touch(PROJECT_ROOT . '/Storage/Logs/bot.log');
|
|
}
|
|
Analog::handler(File::init(PROJECT_ROOT . 'Storage/Logs/bot.log'));
|
|
|
|
|
|
Analog::info("Finished intializing configuration and dependencies.");
|