Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alco/chatty
Basic IRC client for writing bots
https://github.com/alco/chatty
Last synced: 3 months ago
JSON representation
Basic IRC client for writing bots
- Host: GitHub
- URL: https://github.com/alco/chatty
- Owner: alco
- License: mit
- Created: 2014-07-03T23:16:50.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-10T07:27:05.000Z (over 8 years ago)
- Last Synced: 2024-10-04T06:51:45.769Z (3 months ago)
- Language: Elixir
- Size: 66.4 KB
- Stars: 36
- Watchers: 3
- Forks: 5
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - A basic IRC client that is most useful for writing a bot. (Chatting)
- fucking-awesome-elixir - chatty - A basic IRC client that is most useful for writing a bot. (Chatting)
- awesome-elixir - chatty - A basic IRC client that is most useful for writing a bot. (Chatting)
README
Chatty
======A basic IRC client that is most useful for writing a bot.
## Installation
Add Chatty as a dependency to your Mix project:
```elixir
def application do
[applications: [:chatty]]
enddefp deps do
[{:chatty, github: "alco/chatty"}]
end
```## Usage
You need to set the following environment parameters for the `:chatty` app:
* `:nickname` – the nick to use when connecting and identifying with NickServ
* `:channels` – a list of channel names to join upon connect
* `:password` (optional) – when set, Chatty will identify with NickServ using
this passwordChatty's behaviour is customized by means of adding hooks that get invoked on
each incoming message. A ping hook is included as an example. Set it up as
follows:```iex
iex> Chatty.add_hook :ping, &Chatty.Hooks.PingHook.run/2, in: :text, direct: true
:ok
```Now, whenever Chatty sees the message `: ping`, it will send a reply
from the set of predefined ones back to the sender:```
02:05:35 @true_droid | beamie_test: ping
02:05:35 beamie_test | true_droid: pong
```## License
This software is licensed under [the MIT license](LICENSE).