Skip to content

Built in Commands

sump pump edited this page Apr 4, 2019 · 2 revisions

Built-in commands

Manebot provides more than 20 built-in commands, most of which are only used for system administration.

This page documents these built-in commands in Manebot.

as or runas

Description: Runs a command as another user.

Example

Runs "ping" as root.

as root ping

ban or unban

Description: Manages user bans.

Example: ban user

Bans "baduser" with the message, "You've been bad.". They could see this message when they run commands.

ban baduser You've been bad.

Bans "baduser" with no message.

ban baduser

Example: unban user

Unbans "baduser".

unban baduser

Example: list bans

Lists all bans.

ban list

Lists ban for a user.

ban list baduser

chat

Description: Manages chats. Chats are the network-level representation of text/communication channels. These can be private, where a single user speaks to the bot, or public, where multiple users speak in a single chat. Chats are provided by their respective platforms, such as Discord.

Example: list chats

Lists all chats for a platform. Note that, for the first command, you must have the Discord plugin installed, and it must also be enabled.

chat list discord
chat list console

Example: get chat info

Gets chat information for a specific chat. You must specify a platform, then chat ID on that Platform to get information for a chat.

chat info discord 5919033825404
chat info console std

confirm

Description: Confirms a pending prompt. Prompts can be broadcast for users when, for example, someone is trying to associate their platform account with a specific username.

Example: confirm last prompt

Confirms the last prompt, and executes the action associated with it.

confirm

conv or conversation

Description: Manages conversations. Conversations are the virtual chat construct in Manebot, and persist even when the related Chat isn't accessible over the network. Conversations have metadata, such as permissions which their member users can inherit when executing commands in that associated Chat.

Example: get current conversation information

Gets current conversation information

conversation

Gets another conversation's information

conversation console:std

Example: list conversations

conversation list

Example: search conversations

conversation search "name"

group

Description: Manages user groups. User groups categorize users, and can also provide permissions to their members.

Example: list groups

group list

Example: get group information

Gets group information for the group "coolkids"

group info coolkids

Example: add user to group

Adds the user "someone" to "coolkids"

group add someone coolkids

Example: create a new group

Creates the new user group "coolkids"

group create coolkids

Example: remove a user from a group

Removes the user "someone" from the group "coolkids"

group remove someone coolkids

help or h

Description: Gets command or sub-command help. Most commands in Manebot have auto-generated command help pages that you can search through to learn more about what you can do with Manebot.

Example: get command help

Lists all commands and their descriptions

help
help page:2

Example: get command help for a sub-command

Lists all sub-commands and their descriptions for a specific command

help user
help user page:2
help user info
help group
help permission add

nickname or nick

Description: Changes your nickname. All Manebot users have two username components: their actual username, then their display name (or nickname). You can change your nickname, but never your username.

Example: change nickname

Changes your nickname to "coolkid"

nick coolkid
nickname coolkid

permission or perm

Description: Gets or sets permissions on all permissible entities: users, group, and conversations. Permissions can either be explicitly granted or denied to specific entities.

Example: add a permission to an entity

Adds the node "permission.node" to an entity.

permission add user coolkid permission.node deny
permission add conversation console:std permission.node allow
permission add group coolkids permission.node

Example: remove a permission to an entity

Removes the node "permission.node" from an entity.

permission remove user coolkid permission.node deny
permission remove conversation console:std permission.node allow
permission remove group coolkids permission.node

Example: list permissions

Lists permissions for an entity.

permission list user coolkid
permission list conversation console:std
permission list group coolkids

ping

Description: Simply pings the bot. It's a good do-nothing command.

Example

ping

platform

Description: Manages platforms. Platforms are communication platforms such as Discord and are usually provided by plugins.

Example: connect a platform

Connects discord. The Discord plugin should already be installed.

platform connect discord

Example: disconnect a platform

Disconnects discord until the next time Manebot starts up. The Discord plugin should already be installed. If you want to permanently disable a platform, you should disable the plugin it is being provided by.

platform disconnect discord

Example: get platform information

Gets platform information for discord.

platform info discord

Example: list provided platforms

Lists provided platforms.

platform list
platform list page:2

Example: search platforms

Searches platforms.

platform search "discor"

plugin

Description: Manages plugins. Plugins are the way you add features and extend Manebot, by adding new platforms for Manebot to connect to, or new ways for your bot to interact with its users on those platforms.

Example: get plugin information

Gets the plugin information for the platform that you're currently reaching Manebot with. If you're running this from Discord for example, this would get the discord plugin information, if you didn't specify a plugin name explicitly.

plugin
plugin info discord

Example: automatically remove unneeded plugins

Some plugins only provide features when another plugin extends them. Take audio for example, a plugin that is essentially useless if nothing is using it. You can automatically mark plugins with no dependencies as "for removal" using autoremove.

plugin autoremove

Example: disable a plugin

Disables a plugin. Plugins can only be disabled if they are not required by another plugin, such as audio being required by discord.

plugin disable discord

Example: enable a plugin

Enables a plugin. You must have installed the plugin prior for it to be enabled.

plugin enable discord

Example: install a plugin

Installs a plugin, and all of its dependencies automatically.

plugin install discord

Example: update a plugin

Checks for updates to a previously installed plugin. You should restart Manebot to actually pull the updated code. With no plugin name, Manebot looks for the latest versions of all installed plugins.

plugin update
plugin update discord

Example: set a plugin property

Sets a plugin property. Plugins have metadata in the form of properties,

plugin update
plugin update discord

profile

Description: Profiles threads that are a member of the virtual subsystem. Manebot has a simple, but efficient performance profiler, and thread can "opt-in" to participate in performance readings. Using this command, you can read out the values of various repetitive tasks that threads are running to evaluate performance issues.

property or prop

Description: Manages properties on an entity. Entities are users, conversations, and/or groups. These properties are different from plugin properties, which are managed via the plugin command.

Example: get a property

Gets the value of a property. Properties are binary, so the result is a Base64-encoded value.

property get user coolkid property.name
property get group groupname property.name
property get conversation console:std property.name

Example: set a property

Sets the value of a property with Base64-encoded bytes.

property set user coolkid property.name Base64...
property set group groupname property.name Base64...
property set conversation console:std property.name Base64...

Example: list properties on an entity

property list user coolkid
property list group groupname
property list conversation

Example: unset a property

property unset user coolkid property.name
property unset group groupname property.name
property unset conversation console:std property.name

repository or repo

Description: Manages Maven repositories for the entire plugin system. If you have your own Maven repository, you can make Manebot query it when installing or updating plugins by adding it with this command. Repositories are defined with JSON, like such:

{
 "type": "default",
 "url": "http://your.repo.url/maven",
 "authentication": [
   {
     "type": "basic",
     "username": "username_here",
     "password": "password_here"
   }
 ]
}

Authentication is optional, and if provided, it is kept in the database only and is not exposed afterwards. Note that when defining a repository, your JSON should never define an id field. This is handled for you by Manebot, as the id is used to associate the repository in the database.

Example: add a repository

Adds a custom repository with the id "coolrepo".

repository add coolrepo {"type":"default","url":"http://cool.repo/maven"}

Example: remove a repository

Removes a repository with the id "coolrepo"

repository remove coolrepo

Example: enable a repository

Enables a repository with the id "coolrepo".

repository enable coolrepo

Example: disable a repository

Disables a repository with the id "coolrepo".

repository disable coolrepo

Example: list all repositories

Lists all repositories.

repository list

Example: get repository information

Gets repository information for "coolrepo". Does not show authentication information, if previously provided.

repository info coolrepo

runtime

Description: Gets system runtime information, like the current OS username, OS name, and memory usage.

runtime

shutdown

Description: Schedules an immediate system shutdown.

shutdown

user

Description: Manages users and platform associations for users.

Example: create connection to a platform user

Creates a platform association with the user "root" to the platform user "stdin" on the platform "console"

user connection create root console stdin

Example: list platform connections for a user

Lists all registered platform connections/associations for a given user.

user connection list root
user connection list root page:2

Example: remove platform connection from a user

Removes the platform user association from the "stdin" user on the "console" platform. This user would then need to re-register on the bot.

user connection renive root console stdin

Example: create a new user

Creates a new user. There are three user types in Manebot:

  • admin: System Administrator with all permissions by default.
  • standard: Common user type for most users.
  • anonymous: Ideal task user type; cannot execute commands in a chat.

If no user type is specified, it is assumed to be standard.

user create coolkid
user create coolkid standard
user create coolkid anonymous
user create coolkid admin

Example: get user information

user info coolkid

Example: list users

user list

Example: search users

user search "username"

Example: change user type

Changes a user's type. There are three user types in Manebot:

  • admin: System Administrator with all permissions by default.
  • standard: Common user type for most users.
  • anonymous: Ideal task user type; cannot execute commands in a chat.
user type set coolkid admin
user type set coolkid standard
user type set coolkid anonymous

version or ver

Description: Gets system version

version

whoami

Description: Gets your current username and display name.

whoami
Clone this wiki locally