mirror of
https://github.com/thewesker/twitter_ebooks.git
synced 2025-12-20 04:11:08 -05:00
Add default delay range, configure check
This commit is contained in:
@@ -180,12 +180,17 @@ module Ebooks
|
|||||||
@seen_tweets ||= {}
|
@seen_tweets ||= {}
|
||||||
|
|
||||||
@username = username
|
@username = username
|
||||||
|
@delay_range ||= 1..6
|
||||||
configure
|
configure
|
||||||
|
|
||||||
b.call(self) unless b.nil?
|
b.call(self) unless b.nil?
|
||||||
Bot.all << self
|
Bot.all << self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def configure
|
||||||
|
raise ConfigurationError, "Please override the 'configure' method for subclasses of Ebooks::Bot."
|
||||||
|
end
|
||||||
|
|
||||||
# Find or create the conversation context for this tweet
|
# Find or create the conversation context for this tweet
|
||||||
# @param tweet [Twitter::Tweet]
|
# @param tweet [Twitter::Tweet]
|
||||||
# @return [Ebooks::Conversation]
|
# @return [Ebooks::Conversation]
|
||||||
|
|||||||
Reference in New Issue
Block a user