Class: DiscordBot::Client
- Inherits:
-
Object
- Object
- DiscordBot::Client
- Includes:
- Channels::Channel, Channels::CreateMessage, Channels::CreateWebhook, Gateway::GetGateway, Gateway::GetGatewayBot, Guilds::Channels, Guilds::Members, Users::CreateChannel, Users::Me, Webhooks::Execute, HTTParty
- Defined in:
- lib/discord_bot/client.rb,
lib/discord_bot/client/users/me.rb,
lib/discord_bot/client/guilds/members.rb,
lib/discord_bot/client/guilds/channels.rb,
lib/discord_bot/client/channels/channel.rb,
lib/discord_bot/client/webhooks/execute.rb,
lib/discord_bot/client/gateway/get_gateway.rb,
lib/discord_bot/client/users/create_channel.rb,
lib/discord_bot/client/channels/create_message.rb,
lib/discord_bot/client/channels/create_webhook.rb,
lib/discord_bot/client/gateway/get_gateway_bot.rb
Overview
Client library
Defined Under Namespace
Modules: Channels, Gateway, Guilds, Users, Webhooks
Instance Attribute Summary collapse
-
#bot_token ⇒ Object
readonly
Returns the value of attribute bot_token.
-
#user_agent ⇒ Object
readonly
Returns the value of attribute user_agent.
Instance Method Summary collapse
-
#initialize(bot_token:) ⇒ Client
constructor
A new instance of Client.
Methods included from Gateway::GetGatewayBot
Methods included from Gateway::GetGateway
Methods included from Users::Me
Methods included from Users::CreateChannel
Methods included from Webhooks::Execute
Methods included from Channels::CreateWebhook
Methods included from Channels::CreateMessage
Methods included from Channels::Channel
Methods included from Guilds::Channels
Methods included from Guilds::Members
Constructor Details
#initialize(bot_token:) ⇒ Client
Returns a new instance of Client.
33 34 35 36 |
# File 'lib/discord_bot/client.rb', line 33 def initialize(bot_token:) @bot_token = bot_token @user_agent = "ComConBot #{DiscordBot::VERSION}" end |
Instance Attribute Details
#bot_token ⇒ Object (readonly)
Returns the value of attribute bot_token.
31 32 33 |
# File 'lib/discord_bot/client.rb', line 31 def bot_token @bot_token end |
#user_agent ⇒ Object (readonly)
Returns the value of attribute user_agent.
31 32 33 |
# File 'lib/discord_bot/client.rb', line 31 def user_agent @user_agent end |