- Discard unused SELECT
- Add two curretly unused convenience functions.
This commit is contained in:
parent
481cfc916e
commit
6cca44581d
1 changed files with 29 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue