The source code of the bot.
-
Bootstrap
The startup files to boot the application. -
-
Cache.php, CacheItem.php, ObjectCache.php
Minimal caching to minimize API calls to the backend. -
DevLogger.php
Helper class to log "impossible" events, that should not happen. The log is written in JSON format in the/app/Bot/Storag/Logs/dev.logfile.
-
-
Client
The helper classes to communicate with the backend and the discord client-
Models
The data models -
Responses
The responses from the backend -
Traits
Commonly used classes -
ApiClient.php
The main class to manage all user data and communication with both ends. -
ApiResponse.php
Helper class to manage all the communication in one place. -
ClientMessages.php
The message templates sent to the discord client. Uses the Smarty template engine. -
Template.php
Minimal template "engine" to generate ANSI colored messages for the discord client.
-
-
Commands
The classes to handle slash commands from the discord client.-
CreateRemainder.php
The/rem <when> <message> (channel)command to create a new remainder -
EditRemainder.php
The/edit <remainder> (when) (message) (channel)command to create a new remainder -
ListRemainders.php
The/list (page)command to show a paginated list of the current remainders -
Profile.php
The/profile (timezone) (locale)command to display/modify the actual users profile -
RemoveRemainder.php
The/delete <remainder>command to remove a remainder (needs confirmation)
-
-
Core
The core components of the commandstring/dphp-bot package -
Events
The main event handling for the discord client-
Message.php
Handles all messages comming from the discord client
NOTE: currentky no custom handling is done here -
Ready.php
Starts the main remainder pull service when the discord server becomes ready
-
-
Services
The main services to handle background tasks- ReminderService.php
Periodically pulls actual remainder from the backend and sends remainders to the discord client
- ReminderService.php
-
Storage
Stores temporary files and program logs -
Test
A rather scarce list of test, the function testings is handled by an outside service currently -
.env.example
The sample configuration file to be filled before deploying the bot -
Bot.php
The main entrypoint for the bot -
BotDev.php
Main entripoint if not run in container