Skip to content

Instantly share code, notes, and snippets.

@FluffyPira
Last active October 18, 2024 08:13
Show Gist options
  • Select an option

  • Save FluffyPira/d5a650d9e6afdbfd6d97 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown

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