Skip to content

Instantly share code, notes, and snippets.

@FluffyPira
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save FluffyPira/d5a650d9e6afdbfd6d97 to your computer and use it in GitHub Desktop.
Save FluffyPira/d5a650d9e6afdbfd6d97 to your computer and use it in GitHub Desktop.
## pulling a specific line
if tweet.text.start_with?('Q')
q_reply = File.readlines("file.txt")
reply(tweet, q_reply[0])
else
reply(tweet, model.make_response(meta(tweet).mentionless, meta(tweet).limit))
end
## pulling a random line
if tweet.text.start_with?('Q')
q_reply = File.readlines("file.txt").sample
reply(tweet, q_reply)
else
reply(tweet, model.make_response(meta(tweet).mentionless, meta(tweet).limit))
end
@Ezmyrelda
Copy link

Thank you so much! You are sweet and amazing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment