class MijDiscord::Bot::AuthInfo
Attributes
id[R]
name[R]
to_s[R]
token[R]
type[R]
Public Class Methods
new(id, token, type, name)
click to toggle source
# File lib/mij-discord/bot.rb, line 14 def initialize(id, token, type, name) @id, @type, @name = id.to_id, type, name @token = case type when :bot then "Bot #{token}" when :user then "#{token}" else raise ArgumentError, 'Invalid token type' end end
Public Instance Methods
bot?()
click to toggle source
# File lib/mij-discord/bot.rb, line 24 def bot? @type == :bot end
inspect()
click to toggle source
# File lib/mij-discord/bot.rb, line 34 def inspect MijDiscord.make_inspect(self, :id, :type, :name) end
user?()
click to toggle source
# File lib/mij-discord/bot.rb, line 28 def user? @type == :user end