tipsypastels

Untitled

Jan 3rd, 2020
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. require 'discordrb'
  2.  
  3. bot = Discordrb::Bot.new(
  4. token: "NOPE",
  5. client_id: 545001294633631795,
  6. )
  7.  
  8. class String
  9. def include_any?(*strings)
  10. strings.any? { |string| include?(string) }
  11. end
  12. end
  13.  
  14. bot.ready do
  15. $FH = bot.servers[464991104866058250]
  16. raise "Fangame Hacktory not found" unless $FH
  17.  
  18. puts "Compiling LALA emotes into local storage..."
  19.  
  20. $LALAS = $FH.emojis.values.collect do |emote|
  21. next [emote.name, emote] if emote.name.include?('lala')
  22. end.compact.to_h
  23.  
  24. puts "Compiled #{$LALAS.length} emotes, LALABOT ready!"
  25. end
  26.  
  27. bot.message do |event|
  28. message = event.message
  29. next if message.author.bot_account?
  30.  
  31. content = message.content.downcase
  32. next unless content.include?('lala')
  33.  
  34. if content.include?('sick')
  35. message.react("🚑")
  36. elsif content.include_any?('mad', 'angry', 'angery', 'angeriest', 'uncomf')
  37. message.react($LALAS['lalamad'])
  38. elsif content.include_any?('comf', 'hap', 'comfy', 'happy')
  39. message.react($LALAS['lalahap'])
  40. elsif content.include_any?('love', 'hug')
  41. message.react($LALAS['lalaheart'])
  42. elsif content.include?('gay')
  43. message.react($LALAS['lalagay'])
  44. end
  45. end
  46.  
  47. bot.run
Advertisement
Add Comment
Please, Sign In to add comment