2015-07-25 03:34:17 -04:00
|
|
|
Lita::Adapters::Tox
|
|
|
|
===================
|
|
|
|
|
|
|
|
[![Gem Version](https://badge.fury.io/rb/lita-tox.svg)](http://badge.fury.io/rb/lita-tox)
|
2017-07-20 17:05:01 -04:00
|
|
|
[![Build Status](https://travis-ci.org/toxon/lita-tox.svg)](https://travis-ci.org/toxon/lita-tox)
|
|
|
|
[![Coverage Status](https://coveralls.io/repos/github/toxon/lita-tox/badge.svg)](https://coveralls.io/github/toxon/lita-tox)
|
2015-07-25 03:34:17 -04:00
|
|
|
|
2015-09-13 16:12:41 -04:00
|
|
|
[Tox](https://tox.chat) adapter for the [Lita](http://lita.io) chat bot.
|
|
|
|
|
2015-09-13 16:29:40 -04:00
|
|
|
|
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
|
|
|
|
At first, see the documentation for Lita: http://docs.lita.io/
|
|
|
|
|
|
|
|
### Installation
|
|
|
|
|
|
|
|
**libtoxcore** should be compiled manually at your computer or server.
|
2015-09-13 17:55:03 -04:00
|
|
|
Follow the instructions in
|
2015-09-13 16:29:40 -04:00
|
|
|
[that file](https://github.com/irungentoo/toxcore/blob/2ab3b14731061cc04d3ccc50a35093c11d018298/INSTALL.md)
|
|
|
|
|
|
|
|
When **libtoxcore** is installed, add **lita-tox**
|
|
|
|
to your Lita instance's Gemfile:
|
|
|
|
|
|
|
|
```ruby
|
2018-03-23 18:57:39 -04:00
|
|
|
gem 'lita-tox', '~> 0.5.0'
|
2015-09-13 16:29:40 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
### Configuration
|
|
|
|
|
2015-09-15 14:31:01 -04:00
|
|
|
`config.robot.name` will be used as Tox user name
|
|
|
|
|
|
|
|
Mentions in Tox usually use user name, Tox clients usually allow mentioning
|
|
|
|
by writing first letters of user name and pressing `<Tab>`, so don't use
|
|
|
|
`config.robot.mention_name`
|
|
|
|
|
2015-09-13 19:41:54 -04:00
|
|
|
#### Optional attributes
|
|
|
|
|
2015-09-13 19:44:59 -04:00
|
|
|
- `savedata_filename` (String) - Path to file where Tox state will be stored (if provided)
|
2015-09-15 14:31:01 -04:00
|
|
|
- `status` (String) - Tox user status
|
2015-09-13 16:29:40 -04:00
|
|
|
|
|
|
|
#### Example
|
|
|
|
|
|
|
|
This is an example `lita_config.rb` file:
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
Lita.configure do |config|
|
2015-09-15 14:31:01 -04:00
|
|
|
config.robot.name = 'Lita chat bot'
|
2015-09-13 16:29:40 -04:00
|
|
|
|
|
|
|
config.robot.adapter = :tox
|
2015-09-13 19:41:54 -04:00
|
|
|
|
2015-10-23 10:15:37 -04:00
|
|
|
config.adapters.tox.savedata_filename = 'savedata'
|
|
|
|
config.adapters.tox.status = "Send me \"#{config.robot.name}: help\""
|
2015-09-13 16:29:40 -04:00
|
|
|
end
|
|
|
|
```
|