Skip to content

Instantly share code, notes, and snippets.

@Lavode
Created October 31, 2017 17:47
Show Gist options
  • Save Lavode/75829b220404923f2d484436863fd23e to your computer and use it in GitHub Desktop.
Save Lavode/75829b220404923f2d484436863fd23e to your computer and use it in GitHub Desktop.
#!/bin/ruby
# coding: utf-8
require 'discordrb'
bot = Discordrb::Commands::CommandBot.new(
token: ENV['DISCORD_TOKEN'],
client_id: ENV['DISCORD_CLIENT_ID'],
prefix: '!'
)
bot.command(:test, min_args: 0, max_args: 1) do |event, arg = 42|
"Argument was: #{ arg }"
end
puts bot.invite_url
bot.run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment