Skip to content
This repository has been archived by the owner on Aug 31, 2020. It is now read-only.

Commit

Permalink
Add new plugins to bot.rb and remove the old cat command.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chew committed Sep 3, 2017
1 parent 1b9beaa commit 97524da
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions bot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
require 'json'
require 'net/http'
require 'yaml'
require 'Nokogiri'
require 'open-uri'

# Load config from file
CONFIG = YAML.load_file('config.yaml')
Expand All @@ -25,19 +27,14 @@
c.channels = [CONFIG['channels']]

# Plugins to Load, usually you don't need to modify
c.plugins.plugins = [UuidLookup, JoinChannel, PartChannel, ServerStatus, Ping, Uptime, Restart]
c.plugins.plugins = [UuidLookup, JoinChannel, PartChannel, ServerStatus, Ping, Uptime, Restart, RandomCat, MemeDB]

# Check to see if the user really modified the config.
if c.nick == '' || c.server == '' || c.channels == ['']
puts 'You did not configure your bot! Please configure the bot.'
exit
end
end

# A command I didn't convert to a plugin yet.
on :message, '!cat' do |m|
m.reply (JSON.parse(RestClient.get('http://random.cat/meow'))['file']).to_s
end
end

# START THE BOT
Expand Down

0 comments on commit 97524da

Please sign in to comment.