Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'discordrb'
- bot = Discordrb::Bot.new(
- token: "NOPE",
- client_id: 545001294633631795,
- )
- class String
- def include_any?(*strings)
- strings.any? { |string| include?(string) }
- end
- end
- bot.ready do
- $FH = bot.servers[464991104866058250]
- raise "Fangame Hacktory not found" unless $FH
- puts "Compiling LALA emotes into local storage..."
- $LALAS = $FH.emojis.values.collect do |emote|
- next [emote.name, emote] if emote.name.include?('lala')
- end.compact.to_h
- puts "Compiled #{$LALAS.length} emotes, LALABOT ready!"
- end
- bot.message do |event|
- message = event.message
- next if message.author.bot_account?
- content = message.content.downcase
- next unless content.include?('lala')
- if content.include?('sick')
- message.react("🚑")
- elsif content.include_any?('mad', 'angry', 'angery', 'angeriest', 'uncomf')
- message.react($LALAS['lalamad'])
- elsif content.include_any?('comf', 'hap', 'comfy', 'happy')
- message.react($LALAS['lalahap'])
- elsif content.include_any?('love', 'hug')
- message.react($LALAS['lalaheart'])
- elsif content.include?('gay')
- message.react($LALAS['lalagay'])
- end
- end
- bot.run
Advertisement
Add Comment
Please, Sign In to add comment