Created
June 29, 2018 22:17
-
-
Save MazeW/cdf0362bf377417d35c126847deb8dba to your computer and use it in GitHub Desktop.
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
# l33t ruby bot made by yours truly | |
require 'discordrb' | |
require 'yaml' | |
config = YAML.load_file('config.yml') | |
client = Discordrb::Commands::CommandBot.new token: config['bot_token'], prefix: config['bot_prefix'] | |
client.command(:ping, chain_usable: false, description: 'Basic ping command to test if bot is alive or not', usage: 'ping') do |event| | |
event.respond 'Pong!' | |
end | |
client.command(:roll, description: 'picks a random number from 1 to 6', usage: 'roll') do |event| | |
event.respond event.author.mention + ', you rolled ' + rand(1..5).to_s + '! :game_die:' | |
end | |
client.command(:test, chain_usable:false, description: 'test', usage: 'test') do |event| | |
event.channel.send_embed do |embed| | |
embed.title = 'penis' | |
embed.description = 'is big' | |
embed.image = Discordrb::Webhooks::EmbedImage.new(url: event.author.avatar_url) | |
end | |
end | |
client.run |
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
bot_token: 't0ken' | |
bot_prefix: 'r>' | |
bot_owner: '77446106442629120' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment