mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-04 11:33:27 +03:00
dont allow set token when connected
This commit is contained in:
@@ -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