class DBio::DiscordProfile
Find information about a Discord Profile.
Public Class Methods
new(data)
click to toggle source
Initialize the profile
# File lib/dbio/discord_profile.rb, line 4 def initialize(data) @data = data end
Public Instance Methods
avatar_hash()
click to toggle source
@return [String] the avatar hash of this user
# File lib/dbio/discord_profile.rb, line 20 def avatar_hash @data['avatar_hash'] end
discriminator()
click to toggle source
@return [String] this user's discriminator
# File lib/dbio/discord_profile.rb, line 25 def discriminator @data['discriminator'] end
distinct()
click to toggle source
@return [String] the user's name+discriminator. Same as it is in discordrb
# File lib/dbio/discord_profile.rb, line 35 def distinct "#{username}\##{discriminator}" end
id()
click to toggle source
The id of the user. @return [Integer] User ID in integer form.
# File lib/dbio/discord_profile.rb, line 10 def id @user['id'].to_i end
public_flags()
click to toggle source
@return [Integer] public flags provided via Oauth, not useful on their own.
# File lib/dbio/discord_profile.rb, line 30 def public_flags @data['public_flags'] end
username()
click to toggle source
@return [String] the username as it appears on Discord
# File lib/dbio/discord_profile.rb, line 15 def username @data['username'] end