Google Hangouts bot
Hangupsbot is a chat bot designed for working with Google Hangouts.
Please see:
telesync
for using Telegram with the hangoutsbot.Note: First run? See the installation instructions
run /path/to/venv/bin/hangupsbot
with these optional arguments:
usage: hangupsbot [-h] [-d] [-s] [--base_dir BASE_DIR] [--log LOG]
[--cookies COOKIES] [--memory MEMORY] [--config CONFIG]
[--retries RETRIES] [--version]
optional arguments:
-h, --help show this help message and exit
-d, --debug log detailed debugging messages
(default: False)
-s, --service strip the timestamp from the stdout-log
(default: False)
--base_dir BASE_DIR base dir for the log-, cookies-, config- and memory-path
(default: ~/.local/share/hangupsbot)
--log LOG log file path
(default: ~/.local/share/hangupsbot/hangupsbot.log)
--cookies COOKIES cookie storage path
(default: ~/.local/share/hangupsbot/cookies.json)
--memory MEMORY memory storage path
(default: ~/.local/share/hangupsbot/memory.json)
--config CONFIG config storage path
(default: ~/.local/share/hangupsbot/config.json)
--retries RETRIES Maximum disconnect / reconnect retries before quitting
(default: 5)
--version show program's version number and exit
Example: /opt/venv/bin/hangupsbot --cookies ~/mybot/cookies.secret
Configuration directives can be specified in config.json
.
Please note that the config.json
file supplied with the repository is not
supposed to be edited/changed. It is the reference file used by the bot to
create the actual configuration file located elsewhere in the system. To find
out where the actual file is, please see the
Additional Configuration section
in the installation instructions.
Most configuration directives are specified globally
config.json
.config.conversations[<conversation-id>].<configuration option>
.The plugins
key in config.json
allows you to optionally specify a list of
plugins that will be loaded by the bot on startup. If this option is left as
null
, then all available plugins will be loaded.
To specify the plugins to be loaded, first ensure that the correct .py
files
are inside your hangupsbot/plugin/
directory, then modify the plugins
key
in config.json
to reflect which plugins/files you want to load e.g.
plugins: ["mentions", "default", "chance", "syncrooms"]
Some plugins may require extra configuration.
config.json
is the the configuration provider for the bot and its plugins.
Some interesting plugins:
The wiki has a more comprehensive
list of plugins
There are two general types of interactions with the bot:
/bot
commands begin with /bot
e.g. /bot dosomething
The base bot supports some basic command even without any plugins loaded.
Here is a partial list:
/bot help
/bot ping
pong
./bot version
A full list of commands supported by the base framework is available at the
Core Commands
wiki page.
cd ~/hangupsbot
)git pull
to pull the latest version of hangupsbotInstall lastest features
make install
You can specify a custom location for the virtual environment:
make install venv=/my/path
-d
parameter e.g.
./venv/bin/hangupsbot -d
DEBUG
for a more verbose and informative logtail -F
the log file, which is probably located at/<user>/.local/share/hangupsbot/hangupsbot.log
- the location varies by<name of the default logfile>_warnings.log
is created toProgram isn’t running:
hangupsbot
and its dependecies./venv/bin/hangups
to check if the original hangups library is working~/.local/share/hangupsbot/cookies.json
and try againBot isn’t responding to messages:
Please see
https://github.com/hangoutsbot/hangoutsbot/wiki/Authoring-Bot-Extensions
Hangoutsbot is derived from
hangoutsbot
On 2017-07-17, this fork was made standalone