Created
December 4, 2020 14:56
-
-
Save MauroEldritch/6100eb33af21ac5e73fc1491cab35e4b to your computer and use it in GitHub Desktop.
Discord_Bot.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
#Mauro Eldritch (plaguedoktor) @ DC5411 - 2020 | |
#sudo gem install discordrb | |
require 'discordrb' | |
#The Token obtained from Discord: https://medium.com/@mauroeldritch/crear-bots-para-discord-en-ruby-en-s%C3%B3lo-10-pasos-778ab1a303f5 (Spanish) | |
$bot_token = '' | |
bot = Discordrb::Bot.new token: $bot_token | |
bot.message(with_text: "/hello") do |event| | |
event.respond "Hello!" | |
end | |
bot.message(with_text: "/bye") do |event| | |
event.respond "Bye! | |
" | |
end | |
bot.run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment