BlendoBot is a Discord bot framework intended for easy implementation of new functionalities and commands. It currently uses DSharpPlus to operate with Discord, but it also has its own interfaces and common code functionality to allow front-ends to easily add and remove functionality from the bot.
BlendoBot.Frontend
is published to the BlendoBot NuGet. To add the package to your project, add the NuGet feed https://nuget.pkg.github.com/BlendoBot/index.json
to your project, and use the latest stable version of BlendoBot.Frontend
. This package implements the infrastructure layer described by BlendoBot.Core into an object called BlendoBot
, which can be created and run with its Start()
method. An example of running this can be seen in BlendoBot.Live.
BlendoBot.Frontend
implements several services.
Config
- ImplementsIConfig
using an in-memory INI file read with Salaros.ConfigParser.BlendoBot
is constructed with a path to a config file, and if it does not exist, this will make a new template config file that needs to be populated with details. An example config file is below. Importantly, theToken
must be supplied with your own Discord bot token, which can be created via Discord's Developer Portal.ActivityType
must be a valid type as described in Discord's Documentation.
[BlendoBot]
Name=BlendoBot
Version=0.0.1.0
Description=Smelling the roses
Author=Biendeo
ActivityType=Watching
ActivityName=clouds
Token=sometoken
Logger
- ImplementsILogger
as atee
style logger which writes logs tolog/LOGFILE.log
whereLOGFILE
is the start date time of the bot.ModuleManager
- ImplementsIModuleManager
by storing guild modules in memory, and persisting information between sessions using an SQLite database. Modules are loaded through reflection, so allIModule
implementing types within the application domain are loaded. It properly instantiates modules in an order that satisfies their dependency tree, and supports renaming commands within guilds.FilePathProvider
- ImplementsIFilePathProvider
by pointing to directories located withindata/
.DiscordInteractor
- ImplementsIDiscordInteractor
by forwarding and abstracting logic away from DSharpPlus related events.AdminRepository
- ImplementsIAdminRepository
by storing information in an SQLite database.
BlendoBot.Frontend
also features an in-built Admin
module, which allows users to run the following below commands.
?help
- Responds to a user with all the commands currently registered, or the usage of a specific command.?about
- Responds to a user with details about the current bot instance, or information about a command and the module associated when specified.?admin
- Allows admins of a Discord guild to manage enabled modules for their guild, as well as promote others to be able to access admin features of BlendoBot.