Explorar el Código

add very basic hello command

Kylie Jo Swistak hace 6 años
padre
commit
3daa404578
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      bot.rb

+ 5 - 0
bot.rb

@@ -42,6 +42,11 @@ bot = Discordrb::Bot.new(token: token)
 
 # This will trigger on every message sent in discord
 bot.message do |event|
+  content = event.message.content
+
+  if content == '!hello'
+    event.respond("Hello there #{event.author.name}")
+  end
 end
 
 # This will trigger on every reaction is added in discord