Fix typos again

This commit is contained in:
luni3359 2020-10-21 07:33:03 -05:00
parent 8624a1dced
commit ef2acea5b0
2 changed files with 5 additions and 5 deletions

View file

@ -351,7 +351,7 @@ class DiscordConnector:
logging.info(
"Could not get room")
return
if j["data"]["type"] == 2:
if j["data"]["type"] == 2: # Voice channel
for voice in j["data"]["voice_states"]:
if voice["user"]["id"] == self.user["id"]:
self.set_channel(j["data"]["id"], False)
@ -364,7 +364,7 @@ class DiscordConnector:
thisuser["nick"] = j["data"]["nick"]
self.update_user(thisuser)
self.set_in_room(thisuser["id"], True)
elif j["data"]["type"] == 0:
elif j["data"]["type"] == 0: # Text channel
if self.request_text_rooms_response is not None:
self.request_text_rooms_response[j['data']
['position']] = j['data']
@ -585,7 +585,7 @@ class DiscordConnector:
recv, _w, _e = select.select((self.websocket.sock,), (), (), 0)
while recv:
try:
# Recieve & send to on_message
# Receive & send to on_message
msg = self.websocket.recv()
self.on_message(msg)
recv, _w, _e = select.select((self.websocket.sock,), (), (), 0)

View file

@ -79,7 +79,7 @@ class TextSettingsWindow(SettingsWindow):
c_model = Gtk.ListStore(str, bool)
self.channel_lookup = []
# if a guild is specified, poulate channel list with every channel from *just that guild*
# If a guild is specified, populate channel list with every channel from *just that guild*
if self.guild != GUILD_DEFAULT_VALUE:
for position in self.list_channels_keys:
chan = self.list_channels[position]
@ -180,7 +180,7 @@ class TextSettingsWindow(SettingsWindow):
self.list_channels = in_list
self.list_channels_keys = []
for (key, _value) in enumerate(in_list):
# filter for only text channels
# Filter for only text channels
# https://discord.com/developers/docs/resources/channel#channel-object-channel-types
if in_list[key] is not None and in_list[key]["type"] == 0:
self.list_channels_keys.append(key)