summaryrefslogtreecommitdiff
path: root/gateway/src/utils.rs
blob: 48a9aed42bbc25e3264509d20419cf5ab1f9ee09 (plain)
1
2
3
4
5
6
7
8
/// 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 { "" }
    );
}