Method: Discordrb::Gateway#initialize
- Defined in:
- lib/discordrb/gateway.rb
#initialize(bot, token, shard_key = nil, compress_mode = :stream, intents = ALL_INTENTS) ⇒ Gateway
Returns a new instance of Gateway.
149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/discordrb/gateway.rb', line 149 def initialize(bot, token, shard_key = nil, compress_mode = :stream, intents = ALL_INTENTS) @token = token @bot = bot @shard_key = shard_key # Whether the connection to the gateway has succeeded yet @ws_success = false @check_heartbeat_acks = true @compress_mode = compress_mode @intents = intents end |