Begin work on next version
This commit is contained in:
parent
17d218c123
commit
32facc0d87
@ -11,6 +11,10 @@ targets:
|
|||||||
dependencies:
|
dependencies:
|
||||||
telepathy:
|
telepathy:
|
||||||
git: http://dev.danilafe.com/Crystal-Bots/telepathy
|
git: http://dev.danilafe.com/Crystal-Bots/telepathy
|
||||||
|
cron_scheduler:
|
||||||
|
github: kostya/cron_scheduler
|
||||||
|
sqlite3:
|
||||||
|
github: crystal-lang/crystal-sqlite3
|
||||||
|
|
||||||
crystal: 0.24.1
|
crystal: 0.24.1
|
||||||
|
|
||||||
|
@ -2,12 +2,15 @@ require "./joann-pupper-bot/*"
|
|||||||
require "logger"
|
require "logger"
|
||||||
require "telepathy"
|
require "telepathy"
|
||||||
require "time"
|
require "time"
|
||||||
|
require "sqlite3"
|
||||||
|
require "cron_scheduler"
|
||||||
|
|
||||||
# Chat IDs
|
# Chat IDs
|
||||||
chatid_joann = 215301902
|
chatid_joann = 215301902
|
||||||
chatid_daniel = 220888832
|
chatid_daniel = 220888832
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
|
database = "sqlite3://./data.sqlite"
|
||||||
subreddit = "rarepuppers"
|
subreddit = "rarepuppers"
|
||||||
chatid = chatid_daniel
|
chatid = chatid_daniel
|
||||||
delay = 1.hours
|
delay = 1.hours
|
||||||
@ -24,6 +27,10 @@ bot.command "ping" do |update, args|
|
|||||||
bot.send_message(update.message.as(Telepathy::Message).chat.id, "pong")
|
bot.send_message(update.message.as(Telepathy::Message).chat.id, "pong")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Tasks
|
||||||
|
def update_database(db)
|
||||||
|
end
|
||||||
|
|
||||||
bot.command "pupper" do |update, args|
|
bot.command "pupper" do |update, args|
|
||||||
url_tuple = get_reddit_post(subreddit, completed)
|
url_tuple = get_reddit_post(subreddit, completed)
|
||||||
if url_tuple
|
if url_tuple
|
||||||
|
Loading…
Reference in New Issue
Block a user