|
|
|
@ -2,12 +2,15 @@ require "./joann-pupper-bot/*" |
|
|
|
|
require "logger" |
|
|
|
|
require "telepathy" |
|
|
|
|
require "time" |
|
|
|
|
require "sqlite3" |
|
|
|
|
require "cron_scheduler" |
|
|
|
|
|
|
|
|
|
# Chat IDs |
|
|
|
|
chatid_joann = 215301902 |
|
|
|
|
chatid_daniel = 220888832 |
|
|
|
|
|
|
|
|
|
# Configuration |
|
|
|
|
database = "sqlite3://./data.sqlite" |
|
|
|
|
subreddit = "rarepuppers" |
|
|
|
|
chatid = chatid_daniel |
|
|
|
|
delay = 1.hours |
|
|
|
@ -24,6 +27,10 @@ bot.command "ping" do |update, args| |
|
|
|
|
bot.send_message(update.message.as(Telepathy::Message).chat.id, "pong") |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
# Tasks |
|
|
|
|
def update_database(db) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
bot.command "pupper" do |update, args| |
|
|
|
|
url_tuple = get_reddit_post(subreddit, completed) |
|
|
|
|
if url_tuple |
|
|
|
|