summaryrefslogtreecommitdiff
path: root/discord
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2020-10-04 23:19:46 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2020-10-04 23:19:46 -0400
commit8d7c1261aa9d7da0288c668b9b83390c19c74daa (patch)
tree59d0e4d55057a3cb51e23734745fd654f6aed68e /discord
parent68f4578cb4c6855c73d697e4a644f522f1d2bc97 (diff)
downloadabaddon-portaudio-8d7c1261aa9d7da0288c668b9b83390c19c74daa.tar.gz
abaddon-portaudio-8d7c1261aa9d7da0288c668b9b83390c19c74daa.zip
dont allow set token when connected
Diffstat (limited to 'discord')
-rw-r--r--discord/discord.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/discord/discord.cpp b/discord/discord.cpp
index e4e115f..4d43486 100644
--- a/discord/discord.cpp
+++ b/discord/discord.cpp
@@ -364,8 +364,10 @@ void DiscordClient::LeaveGuild(Snowflake id) {
}
void DiscordClient::UpdateToken(std::string token) {
- m_token = token;
- m_http.SetAuth(token);
+ if (!IsStarted()) {
+ m_token = token;
+ m_http.SetAuth(token);
+ }
}
void DiscordClient::HandleGatewayMessageRaw(std::string str) {