fixed quote line joining, linted

master
s00ner 2024-07-15 14:48:59 -04:00
parent 49f0ff3904
commit ad0540d07e
1 changed files with 2 additions and 2 deletions

4
bot.rb
View File

@ -11,7 +11,7 @@ def random_quote(quotes)
quote += "From the #{quotes[entry][:tech]}: #{entry}\n" quote += "From the #{quotes[entry][:tech]}: #{entry}\n"
quote += '```' quote += '```'
quote += quotes[entry][:quote] quote += quotes[entry][:quote]
quote += '```' "#{quote}```"
end end
# map quote types # map quote types
@ -30,7 +30,7 @@ end
# preserves whitespace intention for quotes, expects array of strings, one line per element # preserves whitespace intention for quotes, expects array of strings, one line per element
def make_pretty_quote(quote) def make_pretty_quote(quote)
quote.map { |line| line.gsub('^^', " \n").gsub('^', "\n") }.join.strip quote.map { |line| line.gsub('^^', " \n").gsub('^', "\n") }.join(' ').strip
end end
token = File.read('./token').strip token = File.read('./token').strip