- Discard unused SELECT

- Add two curretly unused convenience functions.
This commit is contained in:
Trigg 2022-04-12 16:03:50 +00:00
parent 481cfc916e
commit 6cca44581d

View file

@ -405,6 +405,8 @@ class DiscordConnector:
for message in j["data"]["messages"]:
self.add_text(message)
return
elif j["cmd"] == "SELECT_VOICE_CHANNEL":
return
log.warning(j)
@ -610,6 +612,33 @@ class DiscordConnector:
self.unsub_channel("SPEAKING_START", channel)
self.unsub_channel("SPEAKING_STOP", channel)
def change_voice_room(self, id):
"""
Switch to another voice room
"""
cmd = {
"cmd": "SELECT_VOICE_CHANNEL",
"args": {
"channel_id": id,
"force": True
},
"nonce": "deadbeef"
}
self.websocket.send(json.dumps(cmd))
def change_text_room(self, id):
"""
Switch to another text room
"""
cmd = {
"cmd": "SELECT_TEXT_CHANNEL",
"args": {
"channel_id": id
},
"nonce": "deadbeef"
}
self.websocket.send(json.dumps(cmd))
def do_read(self):
"""
Poorly named logic center.