simplify guild lookup when changing guilds

This commit is contained in:
Adrian Edwards 2020-10-18 16:12:56 -07:00
parent cde125874c
commit b1115a3fe4

View file

@ -364,14 +364,7 @@ class TextSettingsWindow(SettingsWindow):
def change_guild(self, button):
if self.ignore_guild_change:
return
g = self.guild if self.guild != "0" else "0"
for guild in self.guild_list():
guild_id, guild_name = guild
selected = button.get_active()
if selected == guild_name:
g = selected
g = self.guild_lookup[button.get_active()]
self.guild = g
self.save_config()