-
Notifications
You must be signed in to change notification settings - Fork 2
Configuration
This page lists everything you can add to your config.json
. To find the location of your config.json
, please see the section on Additional Configuration.
-
Do not edit the
config.json
file that is supplied with the repo, as this is the reference copy that the bot uses to create your own personalisedconfig.json
elsewhere on your system.
This is the default configuration that is installed with every new bot. It also reflects the minimum configuration required to get the bot working.
"admins": []
# no admins are configured when bot is first run
This key defines bot administrators and is an empty list for new bots. During Initial Configuration, the starter plugin will add the first administrator "chat id" to this list automatically.
It can also be configured manually, by editing the file and adding chat ids to the list. A bot can have unlimited administrators. Example:
"admins": [
"111111111111111111111",
"111111111111111111112",
"111111111111111111113"
]
- Note: Chat ids are always numerical, and identify the Hangouts user
/bot config
command in the default plugin
"autoreplies_enabled": true,
"autoreplies": [
[
[
"hi bot",
"hello bot"
],
"Hello world!"
]
]
- Note: Auto-replies enabled when bot is first run
These keys are supported as per-conversation settings
"commands_enabled": true
- Note: User commands are enabled on bot first run
false
, the bot will ignore all commands except those originating from users configured as [admins](#admins).
This key is supported as a per-conversation setting
"conversations": {
"CONV_ID": {
"autoreplies_enabled": false,
"commands_enabled": false
}
}
: ''Note: Default configuration does nothing as <code>CONV_ID</code> won't match any conversation''
The <code>conversations</code> key is a special key that can hold '''per-conversation settings'''.
These settings only apply to a specific conversation ID (<code>CONV_ID</code>) and always override the global setting if it is set in both places.
Per-conversation settings are generally used to enable/disable features, and to supply custom configuration directives, for specific conversations.
To get the conversation ID of a conversation, use the command: <code>/bot whereami</code>
=== plugins ===
```json
"plugins": null
- Note: All available plugins loaded when bot is first run
null
will load all available plugins (and sub-plugins) with arbitrary startup order (based on filesystem).
Developer Note: Plugin names always correspond to their actual file (or folder names) on the filesystem.
Therefore, example_plugin
will load plugins/example_plugins.py
or plugins/example_plugins/__init__.py
Some complex plugins may be stored inside a sub-folder inside the plugins directory.
The base plugin usually can be loaded by specifying the folder name in the plugins
key:
"plugins": ["example"]
- Note: Loads base plugin inside
plugins/example/
and the file system structure may resemble the following:
+ plugins
+ example
* __init__.py
* example_subplugin1.py
* example_subplugin2.py
- Note: Sub-plugins are always prefixed with the folder/plugin name
"plugins": [
"example",
"example.example_subplugin1",
"example.example_subplugin2"
]
- Recommendation: Load the main plugin before the sub-plugins
.
) and the prefix of the sub-plugin filename itself (e.g. example_subplugin1
).
An alternate form that does not require the parent module/folder name is also available.
Please note that using this format is NOT RECOMMENDED and is only intended for backward-compatibility with older versions of config.json
.
Additionally, sub-plugins with ambiguous names will not load and will raise a warning during bot initialisation.
"plugins": [
"example",
"example_subplugin1",
"example_subplugin2"
]
- Recommendation: Don't use this, instead use the newer format above
plugins
key is unset or null
.
"watch_new_adds": false
- Note: Monitor Adds plugin will not monitor user adds/joins
This key is supported as a per-conversation setting
All other keys that can be added to the bot configuration and that are not set by default.
Sets the path for [Chatlogger-Plugin|chatlogger] to store conversation logs
[ver<2.7]
Make listed commands admin-only
[ver>=2.7]
Access Control with Tags - Configure listed commands as admin-only
[ver>=2.7]
Access Control with Tags - Configures extra tags to add to commands
This key is supported as a per-conversation setting
[ver<2.7]
Whitelist listed commands as available to users, other unlisted commands become admin-only
[ver>=2.7]
[Access](https://github.com/hangoutsbot/hangoutsbot/wiki/Access-Control-with-Tags) - [Configure](https://github.com/hangoutsbot/hangoutsbot/wiki/Customising-Access-Control#commands_user)
This key is supported as a per-conversation setting
[ver>=2.7]
[Access](https://github.com/hangoutsbot/hangoutsbot/wiki/Access-Control-with-Tags) - [Configures](https://github.com/hangoutsbot/hangoutsbot/wiki/Customising-Access-Control#commandstagsdeny-prefix)
Optional key to set the language of the bot.
When not set, the default language is English (untranslated).
Depending on the status of the translation project, you can set this key to match any of the available language codes such as de
for German, sv
for Swedish, etc.
Note: This setting takes precedence over the environment variable HANGOUTSBOT_LOCALE
When set, overrides the default number of backup files (default: 3) that will be created and maintained by the bot on every memory.json
write
To disable backups entirely, use string "0"
e.g. "memory-failsafe_backups": "0"
When set, overrides the default save delay of memory.json
of 1 second
To disable the delay entirely, use string "0"
e.g. "memory-save_delay": "0"
Contains a list of user ids designated as moderators, used by the Monitor Adds plugin
This key is supported as a per-conversation setting
Note: Use of the mod
key is not recommended, we recommend tagging users as mods instead.
[ver>=2.7]
Access Control with Tags - Configures tag auto-registration settings
Plugin List | Developer Reference: [ Intro | Plugins | Sinks | In-built Functionality | [Configuration] (Configuration) ]