summaryrefslogtreecommitdiff
path: root/gateway/src/client/utils.rs
blob: 141740e06ce0d513eed7f5cab39b86e24197fe5f (plain)
1
2
3
4
5
6
7
8
9

/// Formats a url of connection to the gateway
pub fn get_gateway_url (compress: bool, encoding: &str, v: i16) -> String {
    return format!(
        "wss://gateway.discord.gg/?v={}&encoding={}&compress={}",
        v, encoding,
        if compress { "zlib-stream" } else { "" }
    );
}