-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This framework is in pre-release / alpha stage, not everything has been implemented yet and the Framework API might change from one release to another.
AwesomeChatBot is a chat bot framework that can work with any chat program. It is built on .net core, and thus OS independent.
Nuget package: https://www.nuget.org/packages/AwesomeChatBot/
AwesomeChatBot is a framework / library allowing you to build chat bots that are completly independent from the chat app (for example discord).
This has the huge advantage, that you only have to write the logic for your bot once, and then can use the same code for every chat app (discord, rocket chat, slack, ...)
Further, the framework is built upon the .net core framework, allowing you to run your bot on your favorite OS. And since the framework is full open source, it's completly free!
The framework is basically an abstraction, abstracting general chat bot features, like commands, configuration, command handlers, ...
It provides to you an easy to use framework, where you can add your own command with very little code, and still have full control on every part of the framework. Every part of the framework is interchangable and decoupled, meaning you can inject your own code / override functions whenever needed.
Since this framework is an abstract chat bot framework, it doesn't work on its own!
It will need an API wrapper to work. For example, for the discord API, there is the wrapper AwesomeChatBot.Discord that will allow your bot to work with discord. Since this framework is open source, it's very easy to create your own API wrapper if a wrapper for your favorite chat app does not exist yet. Check GitHub repository from the discord wrapper for more information: https://github.com/RononDex/AwesomeChatBot.Discord
The framework can then be initialized using
var discordWrapper = new AwesomeChatBot.Discord.DiscordWrapper(discordToken, loggerFactory);
var chatbotFramework = new AwesomeChatBot.AwesomeChatBot(discordWrapper, loggerFactory, chatbotSettings);
Your commands have to implement the abstract class AwesomeChatBot.Commands.Command
and further have to implement at least one command type interface (for example AwesomeChatBot.Commands.Handlers.IRegexCommand
)
For more information see the wiki-page on Commands
CommandHandlers are an important part of the framework, they determine how your commands can be called. Whenever a new message is received by the bot, it will get passed along to all registered command handlers. The command handler is tasked to determine whether, for the given message, a certain command should be executed.
For example, the RegexCommandHandler
will use regex to determine if a given command should be executed or not. Every command implementing the IRegexCommand
interface will be checked with this handler.
For more information see the wiki-page on Handlers