botpop/plugins/example.rb
Arthur Poulet 839a14e221 Improv / Plugin / All *
Update all modules and configuration to have a zone in the yaml config
2015-05-09 13:03:56 +02:00

19 lines
561 B
Ruby

#encoding: utf-8
module BotpopPlugins
module MyFuryPlugin
MATCH = lambda do |parent|
parent.on :message, /!whatkingofanimal.*/ do |m| BotpopPlugins::exec_whatkingofanimal m end
end
HELP = ["!whatkingofanimal", "!animallist", "!checkanimal [type]"]
CONFIG = Botpop::CONFIG['example'] || raise(MissingConfigurationZone, 'example')
ENABLED = CONFIG['enable'].nil? ? false : CONFIG['enable']
def self.exec_whatkingofanimal m
m.reply "Die you son of a" + ["lion", "pig", "red panda"].shuffle.first + " !!"
end
end
end