-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.rb
More file actions
37 lines (34 loc) · 991 Bytes
/
example.rb
File metadata and controls
37 lines (34 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require 'bundler/setup'
module Clickbait
# plugins
Dir['plugins/*.rb'].each { |p| require_relative p }
# bot
bot = Cinch::Bot.new do
configure do |c|
c.nick = 'mybot'
c.user = 'something'
c.server = 'irc.freenode.net'
c.channels = ['#chan1', '#chan2']
c.port = 7000
c.ssl.use = true
c.ssl.verify = true
c.plugins.plugins = Plugins.constants.map { |p| Plugins.const_get p }
c.plugins.options[Plugins::Youtube] = { api_key: 'CHANGE_ME' }
c.plugins.options[Plugins::Imdb] = { api_key: 'get one at omdbapi.com' }
c.plugins.options[Plugins::HTTPTitle] = { blacklist: [
'youtube.com',
'youtu.be',
'twitch.tv',
'imdb.com',
'twitter.com'
] }
c.plugins.options[Plugins::Twitter] = {
consumer_key: 'create an app at https://apps.twitter.com',
consumer_secret: 'see above'
}
end
end
# party
bot.loggers.level = :info
bot.start
end