def send_identify(token, properties, compress, large_threshold, shard_key = nil)
      data = {
        # Don't send a v anymore as it's entirely determined by the URL now
        token: token,
        properties: properties,
        compress: compress,
        large_threshold: large_threshold
      }

      # Don't include the shard key at all if it is nil as Discord checks for its mere existence
      data[:shard] = shard_key if shard_key

      send_packet(Opcodes::IDENTIFY, data)
    end
def send_identify(token, properties, compress, large_threshold, shard_key = nil)
      data = {
        # Don't send a v anymore as it's entirely determined by the URL now
        token: token,
        properties: properties,
        compress: compress,
        large_threshold: large_threshold
      }

      # Don't include the shard key at all if it is nil as Discord checks for its mere existence
      data[:shard] = shard_key if shard_key

      send_packet(Opcodes::IDENTIFY, data)
    end
Sends an identify packet (op 2). This starts a new session on the current connection and tells Discord who we are.
 This can only be done once a connection.
 @param token [String] The token with which to authorise the session. If it belongs to a bot account, it must be
   prefixed with "Bot ".
 @param properties [Hash<Symbol => String>] A list of properties for Discord to use in analytics. The following
   keys are recognised:

    - "$os" (recommended value: the operating system the bot is running on)
    - "$browser" (recommended value: library name)
    - "$device" (recommended value: library name)
    - "$referrer" (recommended value: empty)
    - "$referring_domain" (recommended value: empty)

 @param compress [true, false] Whether certain large packets should be compressed using zlib.
 @param large_threshold [Integer] The member threshold after which a server counts as large and will have to have
   its member list chunked.
 @param shard_key [Array(Integer, Integer), nil] The shard key to use for sharding, represented as
   [shard_id, num_shards], or nil if the bot should not be sharded.