Last active
August 29, 2015 14:07
-
-
Save mapyo/0f58e6b2166b202c2f9c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'date' | |
require 'cinch' | |
START_TIME = Time.now | |
$count = 0 | |
class KasumiBot | |
include Cinch::Plugin | |
timer 60, method: :check | |
def check | |
if(kasumi_time) | |
$count += 1 | |
Channel('#python_pd').msg("hoge: image 有村架純") | |
end | |
end | |
def kasumi_time | |
minute = Time.now.strftime("%M") | |
["00", "15", "30", "45"].include?(minute) | |
end | |
end | |
bot = Cinch::Bot.new do | |
configure do |c| | |
c.server = "hoge" | |
c.port = hogehoge | |
c.channels = ['#hoge'] | |
c.nick = 'kasumi_bot' | |
c.realname = 'kasumi_bot' | |
c.user = 'kasumi_bot' | |
c.plugins.plugins = [KasumiBot] | |
end | |
end | |
bot.start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
有村架純をhubotから呼び出す為のbot