mirror of
https://github.com/pragma-/pbot.git
synced 2024-10-04 18:38:47 +02:00
doc/Commands.md: improvements
This commit is contained in:
parent
d6a77e9480
commit
89f7c35593
236
doc/Commands.md
236
doc/Commands.md
@ -2,87 +2,102 @@
|
|||||||
# Commands
|
# Commands
|
||||||
|
|
||||||
<!-- md-toc-begin -->
|
<!-- md-toc-begin -->
|
||||||
* [Command interpreter](#command-interpreter)
|
* [Command interpreter](#command-interpreter)
|
||||||
* [Piping](#piping)
|
* [Piping](#piping)
|
||||||
* [Substitution](#substitution)
|
* [Substitution](#substitution)
|
||||||
* [Chaining](#chaining)
|
* [Chaining](#chaining)
|
||||||
* [Variables](#variables)
|
* [Variables](#variables)
|
||||||
* [Inline invocation](#inline-invocation)
|
* [Inline invocation](#inline-invocation)
|
||||||
* [Types of commands](#types-of-commands)
|
* [Types of commands](#types-of-commands)
|
||||||
* [Built-in commands](#built-in-commands)
|
* [Built-in commands](#built-in-commands)
|
||||||
* [Creating new built-in commands](#creating-new-built-in-commands)
|
* [Creating new built-in commands](#creating-new-built-in-commands)
|
||||||
* [Plugins](#plugins)
|
* [Plugins](#plugins)
|
||||||
* [Factoids](#factoids)
|
* [Factoids](#factoids)
|
||||||
* [Code Factoids](#code-factoids)
|
* [Code Factoids](#code-factoids)
|
||||||
* [Modules](#modules)
|
* [Modules](#modules)
|
||||||
* [List of commands](#list-of-commands)
|
* [List of commands](#list-of-commands)
|
||||||
* [Administrative commands](#administrative-commands)
|
* [version](#version)
|
||||||
* [Logging in and out of PBot](#logging-in-and-out-of-pbot)
|
* [help](#help)
|
||||||
* [login](Admin.md#login)
|
* [Administrative commands](#administrative-commands)
|
||||||
* [logout](Admin.md#logout)
|
* [Logging in and out of PBot](#logging-in-and-out-of-pbot)
|
||||||
* [Admin management commands](#admin-management-commands)
|
* [login](Admin.md#login)
|
||||||
* [adminadd](Admin.md#adminadd)
|
* [logout](Admin.md#logout)
|
||||||
* [adminrem](Admin.md#adminrem)
|
* [Admin management commands](#admin-management-commands)
|
||||||
* [adminset](Admin.md#adminset)
|
* [adminadd](Admin.md#adminadd)
|
||||||
* [adminunset](Admin.md#adminunset)
|
* [adminrem](Admin.md#adminrem)
|
||||||
* [list admins](Admin.md#listing-admins)
|
* [adminset](Admin.md#adminset)
|
||||||
* [Channel management commands](#channel-management-commands)
|
* [adminunset](Admin.md#adminunset)
|
||||||
* [join](Admin.md#join)
|
* [list admins](Admin.md#listing-admins)
|
||||||
* [part](Admin.md#part)
|
* [Channel management commands](#channel-management-commands)
|
||||||
* [chanadd](Admin.md#chanadd)
|
* [join](Admin.md#join)
|
||||||
* [chanrem](Admin.md#chanrem)
|
* [part](Admin.md#part)
|
||||||
* [chanset](Admin.md#chanset)
|
* [chanadd](Admin.md#chanadd)
|
||||||
* [chanunset](Admin.md#chanunset)
|
* [chanrem](Admin.md#chanrem)
|
||||||
* [chanlist](Admin.md#chanlist)
|
* [chanset](Admin.md#chanset)
|
||||||
* [Module management commands](#module-management-commands)
|
* [chanunset](Admin.md#chanunset)
|
||||||
* [load](Admin.md#load)
|
* [chanlist](Admin.md#chanlist)
|
||||||
* [unload](Admin.md#unload)
|
* [ignore](Admin.md#ignore)
|
||||||
* [list modules](Admin.md#listing-modules)
|
* [unignore](Admin.md#unignore)
|
||||||
* [Plugin management commands](#plugin-management-commands)
|
* [whitelist](Admin.md#whitelist)
|
||||||
* [plug](Admin.md#plug)
|
* [blacklist](Admin.md#blacklist)
|
||||||
* [unplug](Admin.md#unplug)
|
* [op](Admin.md#op)
|
||||||
* [replug](Admin.md#replug)
|
* [deop](Admin.md#deop)
|
||||||
* [pluglist](Admin.md#pluglist)
|
* [voice](Admin.md#voice)
|
||||||
* [Command metadata commands](#command-metadata-commands)
|
* [devoice](Admin.md#devoice)
|
||||||
* [cmdset](Admin.md#cmdset)
|
* [mode](Admin.md#mode)
|
||||||
* [cmdunset](Admin.md#cmdunset)
|
* [ban/mute](Admin.md#banmute)
|
||||||
* [Registry commands](#registry-commands)
|
* [unban/unmute](Admin.md#unbanunmute)
|
||||||
* [regset](Registry.md#regset)
|
* [invite](Admin.md#invite)
|
||||||
* [regunset](Registry.md#regunset)
|
* [kick](Admin.md#kick)
|
||||||
* [regchange](Registry.md#regchange)
|
* [Module management commands](#module-management-commands)
|
||||||
* [regshow](Registry.md#regshow)
|
* [load](Admin.md#load)
|
||||||
* [regfind](Registry.md#regfind)
|
* [unload](Admin.md#unload)
|
||||||
* [regsetmeta](Registry.md#regsetmeta)
|
* [list modules](Admin.md#listing-modules)
|
||||||
* [regunsetmeta](Registry.md#regunsetmeta)
|
* [Plugin management commands](#plugin-management-commands)
|
||||||
* [Miscellaneous admin commands](#miscellaneous-admin-commands)
|
* [plug](Admin.md#plug)
|
||||||
* [export](Admin.md#export)
|
* [unplug](Admin.md#unplug)
|
||||||
* [refresh](Admin.md#refresh])
|
* [replug](Admin.md#replug)
|
||||||
* [reload](Admin.md#reload])
|
* [pluglist](Admin.md#pluglist)
|
||||||
* [sl](Admin.md#sl)
|
* [Command metadata commands](#command-metadata-commands)
|
||||||
* [die](Admin.md#die)
|
* [cmdset](Admin.md#cmdset)
|
||||||
* [Factoid commands](#factoid-commands)
|
* [cmdunset](Admin.md#cmdunset)
|
||||||
* [Adding/remove factoids](#addingremove-factoids)
|
* [Registry commands](#registry-commands)
|
||||||
* [factadd](Factoids.md#factadd)
|
* [regset](Registry.md#regset)
|
||||||
* [factrem](Factoids.md#factrem)
|
* [regunset](Registry.md#regunset)
|
||||||
* [factalias](Factoids.md#factalias)
|
* [regchange](Registry.md#regchange)
|
||||||
* [Displaying factoids](#displaying-factoids)
|
* [regshow](Registry.md#regshow)
|
||||||
* [fact](Factoids.md#fact)
|
* [regfind](Registry.md#regfind)
|
||||||
* [factshow](Factoids.md#factshow)
|
* [regsetmeta](Registry.md#regsetmeta)
|
||||||
* [Editing factoids](#editing-factoids)
|
* [regunsetmeta](Registry.md#regunsetmeta)
|
||||||
* [factchange](Factoids.md#factchange)
|
* [Miscellaneous admin commands](#miscellaneous-admin-commands)
|
||||||
* [factmove](Factoids.md#factmove)
|
* [export](Admin.md#export)
|
||||||
* [factundo](Factoids.md#factundo)
|
* [refresh](Admin.md#refresh])
|
||||||
* [factredo](Factoids.md#factredo)
|
* [reload](Admin.md#reload])
|
||||||
* [factset](Factoids.md#factset)
|
* [sl](Admin.md#sl)
|
||||||
* [factunset](Factoids.md#factunset)
|
* [die](Admin.md#die)
|
||||||
* [Information about factoids](#information-about-factoids)
|
* [Factoid commands](#factoid-commands)
|
||||||
* [factlog](Factoids.md#factlog)
|
* [Adding/remove factoids](#addingremove-factoids)
|
||||||
* [factfind](Factoids.md#factfind)
|
* [factadd](Factoids.md#factadd)
|
||||||
* [factinfo](Factoids.md#factinfo)
|
* [factrem](Factoids.md#factrem)
|
||||||
* [count](Factoids.md#count)
|
* [factalias](Factoids.md#factalias)
|
||||||
* [histogram](Factoids.md#histogram)
|
* [Displaying factoids](#displaying-factoids)
|
||||||
* [top20](Factoids.md#top20)
|
* [fact](Factoids.md#fact)
|
||||||
* [Miscellaneous commands](#miscellaneous-commands)
|
* [factshow](Factoids.md#factshow)
|
||||||
|
* [Editing factoids](#editing-factoids)
|
||||||
|
* [factchange](Factoids.md#factchange)
|
||||||
|
* [factmove](Factoids.md#factmove)
|
||||||
|
* [factundo](Factoids.md#factundo)
|
||||||
|
* [factredo](Factoids.md#factredo)
|
||||||
|
* [factset](Factoids.md#factset)
|
||||||
|
* [factunset](Factoids.md#factunset)
|
||||||
|
* [Information about factoids](#information-about-factoids)
|
||||||
|
* [factlog](Factoids.md#factlog)
|
||||||
|
* [factfind](Factoids.md#factfind)
|
||||||
|
* [factinfo](Factoids.md#factinfo)
|
||||||
|
* [count](Factoids.md#count)
|
||||||
|
* [histogram](Factoids.md#histogram)
|
||||||
|
* [top20](Factoids.md#top20)
|
||||||
|
* [Miscellaneous commands](#miscellaneous-commands)
|
||||||
<!-- md-toc-end -->
|
<!-- md-toc-end -->
|
||||||
|
|
||||||
## Command interpreter
|
## Command interpreter
|
||||||
@ -169,29 +184,40 @@ module. Such commands are registered throughout PBot's source code. The owner
|
|||||||
of the PBot instance can locally add new commands by editing PBot's source code
|
of the PBot instance can locally add new commands by editing PBot's source code
|
||||||
or by acquiring and loading Plugins.
|
or by acquiring and loading Plugins.
|
||||||
|
|
||||||
|
* only bot owner can locally create new built-in commands
|
||||||
|
* built-in commands have access to PBot internal API functions and data structures
|
||||||
|
|
||||||
#### Plugins
|
#### Plugins
|
||||||
|
|
||||||
Additional built-in commands can be created by loading PBot Plugins. Plugins are
|
Additional built-in commands can be created by loading PBot Plugins. Plugins are
|
||||||
stand-alone self-contained units of code that can be loaded by the PBot owner.
|
stand-alone self-contained units of code that can be loaded by the PBot owner.
|
||||||
|
|
||||||
Plugins have access to PBot's internal APIs and data structures.
|
* only bot owner can install and load PBot Plugins
|
||||||
|
* PBot Plugins have access to PBot internal API functions and data structures
|
||||||
|
|
||||||
### Factoids
|
### Factoids
|
||||||
|
|
||||||
Factoids are another type of command. Factoids are simple textual strings that
|
Factoids are another type of command. Factoids are simple text commands which
|
||||||
anybody can create. At their most simple, they display their text when invoked.
|
anybody can create. In their most basic form, they simply display their text
|
||||||
However, significantly more complex Factoids can be created by using the powerful
|
when invoked. However, significantly more complex Factoids can be created by
|
||||||
interpreter and by using the even more powerful `/code` Factoid command.
|
using the [powerful interpreter features](#command-interpreter) and by using the even more powerful
|
||||||
|
[`/code` Factoid command](Factoids.md#code).
|
||||||
|
|
||||||
Factoids do not have access to PBot's internal API or data structures.
|
* anybody can create Factoids
|
||||||
|
* Factoids do not have access to PBot internal API functions and data structures
|
||||||
|
|
||||||
|
For more information, see the [Factoids documentations.](Factoids.md)
|
||||||
|
|
||||||
#### Code Factoids
|
#### Code Factoids
|
||||||
|
|
||||||
Code Factoids are Factoids whose text begins with the `/code` command.
|
Code Factoids are Factoids whose text begins with the `/code` command.
|
||||||
These Factoids will execute their text using the scripting or programming
|
These Factoids will execute their text using the scripting or programming
|
||||||
language specified by the `/code` command.
|
language specified by the argument following the `/code` command.
|
||||||
|
|
||||||
Code Factoids do not have access to PBot's internal API or data structures.
|
* anybody can create Code Factoids
|
||||||
|
* Code Factoids do not have access to PBot internal API functions and data structures
|
||||||
|
|
||||||
|
For more information, see the [Code Factoid documentation.](Factoids.md#code)
|
||||||
|
|
||||||
#### Modules
|
#### Modules
|
||||||
|
|
||||||
@ -199,13 +225,30 @@ Modules are simple stand-alone external command-line scripts and programs. Just
|
|||||||
about any application that can be run in your command-line shell can be loaded as
|
about any application that can be run in your command-line shell can be loaded as
|
||||||
a PBot module.
|
a PBot module.
|
||||||
|
|
||||||
Modules do not have access to PBot's internal API or data structures.
|
* only bot owner can install new command-line modules
|
||||||
|
* Modules do not have access to PBot internal API functions and data structures
|
||||||
|
|
||||||
|
For more information, see the [Modules documentation.](Modules.md)
|
||||||
|
|
||||||
## List of commands
|
## List of commands
|
||||||
|
|
||||||
Here is the list of all of PBot's built-in commands and some of the more useful
|
Here is the list of all of PBot's built-in commands and some of the more useful
|
||||||
Factoids, Plugins and Modules.
|
Factoids, Plugins and Modules.
|
||||||
|
|
||||||
|
### version
|
||||||
|
|
||||||
|
The `version` command displays the currently installed PBot revision and
|
||||||
|
revision date. It will also check to see if there is a new version available.
|
||||||
|
|
||||||
|
<pragma-> !version
|
||||||
|
<PBot> PBot version 2845 2020-01-19; new version available: 2850 2020-01-20!
|
||||||
|
|
||||||
|
### help
|
||||||
|
|
||||||
|
The `help` command displays useful information about built-in commands and Factoids.
|
||||||
|
|
||||||
|
Usage: `help [keyword] [channel]`
|
||||||
|
|
||||||
### Administrative commands
|
### Administrative commands
|
||||||
|
|
||||||
#### Logging in and out of PBot
|
#### Logging in and out of PBot
|
||||||
@ -230,6 +273,19 @@ Factoids, Plugins and Modules.
|
|||||||
##### [chanset](Admin.md#chanset)
|
##### [chanset](Admin.md#chanset)
|
||||||
##### [chanunset](Admin.md#chanunset)
|
##### [chanunset](Admin.md#chanunset)
|
||||||
##### [chanlist](Admin.md#chanlist)
|
##### [chanlist](Admin.md#chanlist)
|
||||||
|
##### [ignore](Admin.md#ignore)
|
||||||
|
##### [unignore](Admin.md#unignore)
|
||||||
|
##### [whitelist](Admin.md#whitelist)
|
||||||
|
##### [blacklist](Admin.md#blacklist)
|
||||||
|
##### [op](Admin.md#op)
|
||||||
|
##### [deop](Admin.md#deop)
|
||||||
|
##### [voice](Admin.md#voice)
|
||||||
|
##### [devoice](Admin.md#devoice)
|
||||||
|
##### [mode](Admin.md#mode)
|
||||||
|
##### [ban/mute](Admin.md#banmute)
|
||||||
|
##### [unban/unmute](Admin.md#unbanunmute)
|
||||||
|
##### [invite](Admin.md#invite)
|
||||||
|
##### [kick](Admin.md#kick)
|
||||||
|
|
||||||
#### Module management commands
|
#### Module management commands
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user