mirror of
https://github.com/uowuo/abaddon.git
synced 2026-08-15 05:19:58 +00:00
dont allow set token when connected
This commit is contained in:
1 parent
68f4578cb4
commit
8d7c1261aa
2 files changed
+5
-2
No files matched your search
+4
-2
@@ -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) {
|
||||
|
||||
@@ -96,6 +96,7 @@ void MainWindow::UpdateComponents() {
|
||||
m_menu_discord_connect.set_sensitive(token.size() > 0 && !discord_active);
|
||||
m_menu_discord_disconnect.set_sensitive(discord_active);
|
||||
m_menu_discord_join_guild.set_sensitive(discord_active);
|
||||
m_menu_discord_set_token.set_sensitive(!discord_active);
|
||||
|
||||
if (!discord_active) {
|
||||
m_channel_list.Clear();
|
||||
|
||||
Reference in new issue
Block a user