Skip to content

Basic Concepts

sump pump edited this page May 20, 2020 · 5 revisions

Manebot has several basic concepts to facilitate its general operation as a chatbot. Since the core Manebot engine doesn't "know" about platform-specific features like guilds in Discord, or individual servers in Teamspeak, it's crucial that Manebot has a way to represent these features in a platform-agnostic way.

Entity

Entities are fundamental security objects that represent something with a list of permissions.

User

Users are the fundamental rights-based access object in Manebot. Users are associated to corresponding Platform users (like your Discord account) through the registration system. In most platforms, the default behavior is to run register to register your platform account to a brand new Manebot account, or register tom if you want to ask the Manebot user tom if it's okay you connect your platform account to their Manebot account. All they have to do is run confirm from a place/platform where they've already run register before.

Conversation

Conversations are supplemental security objects that represent a permission object with a list of permissions that is shared among the members in the conversation. For example,

  • Assume Alice and Bob are both in a conversation together
  • Assume that conversation has a permission something.permission added to it
  • John isn't in that conversation, or doesn't have rights to send messages on the chat (i.e. Discord channel) that the conversation is hosted on.

Then, any commands Alice and Bob run in the given conversation are granted something.permission. John, however, cannot run any commands with that permission as he is not in that conversation, and cannot send messages into it.

Group

Like most rights-access security systems, Manebot has a basic Group system that allows you to assign Manebot Users to Groups. You can give Groups special permissions, like moderation rights.

User to group assignment is a many-to-many relationship; a single user can be a member of multiple groups.

Plugin

Plugins provide all the functionality that makes Manebot useable. Without any plugins, Manebot is basically just a useless command-line application. You can install plugins using plugin install, and manage them using the same plugin command; see help plugin for more information how you can manipulate the plugin system to customize Manebot to your needs.

The main purpose of having a plugin system is to let you make Manebot into exactly what you want. You shouldn't need to load bloated, complicated bots onto your communities with features you'll never need to use. Instead, with a plugin system, you just install the plugins you want.

Plugins can provide the following to Manebot:

  • Platforms (in turn: chats, communities, platform users)
  • Commands
  • Features for other depending plugins

Staying up-to-date

Plugins can and do receive updates from their respective development leads, not only for feature additions, but also issues and security bugs get identified and fixed in the development life-cycle regularly. Fortunately, Manebot can update plugins, as it has a built-in, robust package manager. You can update all your plugins with plugin update, which auto-magically figures out the best version of your plugins to use for the "core" version you're running, or be more specific with plugin update ts3 to just update ts3 in the same manner. If you need newer features of a plugin that you can't update to, you should update Manebot itself by re-creating your docker container (and pulling the latest Docker image), or using a later release on GitHub.

Dependencies

In Manebot, plugins can depend other plugins to incorporate the features they provide. This is a seamless process; if you install Teamspeak3 (ts3), it automatically installs audio and media, too, but it might not enable them unless they're absolutely necessary. That part is up to you. When you install discord too, for example, you would have already installed those two dependencies it also has, so Manebot coalesces those dependencies and doesn't re-install them. Updates also apply to dependencies, too, automatically: if you update ts3, Manebot will check audio and media for updates that are mutually compatible with your version of ts3 and discord.

Platform

A Platform is a Manebot object that provides connectivity and interaction capabilities to a specific chat platform, such as Discord, Teamspeak, or Skype. Platforms are the fundamental concept in Manebot that allows Manebot virtually unlimited potential: if you have a chat platform and there's a stable Java API for it, you should be able to get Manebot into that platform.

Chat

Group conversations (think of channels in Discord or Teamspeak, or MUCs in IRC) are considered as Chats in Manebot. Chats can be public, where multiple users can all converse with each-other and/or the bot, or private, where a single user has a 1-on-1 conversation with the bot.

Community

Chats can be grouped together into Communities, but not all platforms support this by nature, so it's not necessarily required that platforms offer this support. For those that do, you can use Communities to group together features in Manebot, like the Music plugin, which allows you to use different file-stores (or none at all!) for streamed tracks, isolate/hide the tracks from one community from another, or merge two communities together so they can see each-other. As you can imagine, there are a lot of interesting possibilities when we break barriers across platforms and start associating them all with their own groups in a single, uniform Community system.

Examples of Communities:

  • Guilds in Discord
  • Servers in Teamspeak
  • Homeservers in Matrix

Platform User

Manebot has two concepts for users: Users, and Platform Users. Platform Users are the individual accounts on their respective Platforms.

Clone this wiki locally