raspberry-bot/src/Bot/init.php

20 lines
542 B
PHP
Raw Normal View History

2020-12-19 15:51:19 +00:00
<?php
use Analog\Analog;
use Analog\Handler\File;
2020-12-19 15:51:19 +00:00
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();
2020-12-27 18:24:38 +00:00
$dotenv->required('CAT_API_KEY')->notEmpty();
2020-12-19 15:51:19 +00:00
define('PROJECT_ROOT', realpath(__DIR__ . '/../../'));
Analog::handler(File::init(PROJECT_ROOT . 'Storage/Logs/bot.log'));
Analog::info("Finished intializing configuration and dependencies.");