Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/augustt198/skypebot
https://github.com/augustt198/skypebot
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/augustt198/skypebot
- Owner: augustt198
- Created: 2014-07-04T03:53:56.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-07-27T14:49:11.000Z (over 10 years ago)
- Last Synced: 2023-08-02T15:35:24.302Z (over 1 year ago)
- Language: Ruby
- Size: 191 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# skypebot
A bot framework for Skype that allows for easy command registration.
## Usage
The bot can be started by executing `skype.rb`
```sh
$ ruby skypebot.rb [options]
```Command options:
```
Usage: ruby skypebot.rb [options]
-i, --id ID Select chat by ID
-t, --topic TOPIC Select chat by topic
-m, --members Select a chat containing member(s)
-s, --skip Begin at the most recent message
```## Commands & Listeners
This SkypeBot framework provides a DSL for easily creating commands and listeners.```ruby
command 'hello', help: 'Get a greeting' do |cmd|
if cmd.has_flag? 'casual'
cmd.reply "Hi #{cmd.user}"
else
cmd.reply "Greetings, #{cmd.user}."
end
end
```Adding listeners is also supported:
```ruby
listen match: /(skypebot)/i do |msg|
msg.reply 'I heard my name!'
end
```
If the `match:` option is not present, all messages will be listened to.