mirror of https://gitlab.com/litecord/litecord.git
lvsp: remove CHANNEL_UPDATE
bitrate is a client thing. lol - lvsp: remove ChannelProperties, same applies to CHANNEL\_REQ - voice.manager: remove channel\_properties
This commit is contained in:
parent
b8f5e01106
commit
b8c3208fa4
40
docs/lvsp.md
40
docs/lvsp.md
|
|
@ -151,9 +151,9 @@ are laid on.
|
||||||
| --: | :-- | :-- |
|
| --: | :-- | :-- |
|
||||||
| 0 | CHANNEL\_REQ | channel assignment request |
|
| 0 | CHANNEL\_REQ | channel assignment request |
|
||||||
| 1 | CHANNEL\_ASSIGN | channel assignment reply |
|
| 1 | CHANNEL\_ASSIGN | channel assignment reply |
|
||||||
| 2 | CHANNEL\_UPDATE | channel update |
|
| 2 | CHANNEL\_DESTROY | channel destroy |
|
||||||
| 3 | CHANNEL\_DESTROY | channel destroy |
|
| 3 | VST\_CREATE | voice state create request |
|
||||||
| 4 | VST\_CREATE | voice state create request |
|
| 4 | VST\_DONE | voice state created |
|
||||||
| 5 | VST\_UPDATE | voice state update |
|
| 5 | VST\_UPDATE | voice state update |
|
||||||
| 6 | VST\_LEAVE | voice state leave |
|
| 6 | VST\_LEAVE | voice state leave |
|
||||||
|
|
||||||
|
|
@ -170,13 +170,6 @@ allocated for the channel.
|
||||||
| --: | :-- | :-- |
|
| --: | :-- | :-- |
|
||||||
| channel\_id | snowflake | channel id |
|
| channel\_id | snowflake | channel id |
|
||||||
| guild\_id | Optional[snowflake] | guild id, not provided if dm / group dm |
|
| guild\_id | Optional[snowflake] | guild id, not provided if dm / group dm |
|
||||||
| channel\_properties | ChannelProperties | channel properties |
|
|
||||||
|
|
||||||
#### ChannelProperties
|
|
||||||
|
|
||||||
| field | type | description |
|
|
||||||
| --: | :-- | :-- |
|
|
||||||
| bitrate | integer | channel bitrate |
|
|
||||||
|
|
||||||
### CHANNEL\_ASSIGN
|
### CHANNEL\_ASSIGN
|
||||||
|
|
||||||
|
|
@ -188,13 +181,6 @@ Sent by the Server to signal the successful creation of a voice channel.
|
||||||
| guild\_id | Optional[snowflake] | guild id, not provided if dm / group dm |
|
| guild\_id | Optional[snowflake] | guild id, not provided if dm / group dm |
|
||||||
| token | string | authentication token |
|
| token | string | authentication token |
|
||||||
|
|
||||||
### CHANNEL\_UPDATE
|
|
||||||
|
|
||||||
Sent by the client to signal an update to the properties of a channel,
|
|
||||||
such as its bitrate.
|
|
||||||
|
|
||||||
Same data as CHANNEL\_REQ.
|
|
||||||
|
|
||||||
### CHANNEL\_DESTROY
|
### CHANNEL\_DESTROY
|
||||||
|
|
||||||
Sent by the client to signal the destruction of a voice channel. Be it
|
Sent by the client to signal the destruction of a voice channel. Be it
|
||||||
|
|
@ -202,6 +188,24 @@ a channel being deleted, or all members in it leaving.
|
||||||
|
|
||||||
Same data as CHANNEL\_ASSIGN, but without `token`.
|
Same data as CHANNEL\_ASSIGN, but without `token`.
|
||||||
|
|
||||||
|
### VST\_CREATE
|
||||||
|
|
||||||
|
**TODO**
|
||||||
|
|
||||||
|
| field | type | description |
|
||||||
|
| --: | :-- | :-- |
|
||||||
|
| user\_id | snowflake | user id |
|
||||||
|
| channel\_id | snowflake | channel id |
|
||||||
|
| guild\_id | Optional[snowflake] | guild id |
|
||||||
|
|
||||||
|
### VST\_DONE
|
||||||
|
|
||||||
|
**TODO**
|
||||||
|
|
||||||
|
### VST\_DESTROY
|
||||||
|
|
||||||
|
**TODO**
|
||||||
|
|
||||||
## Common logic scenarios
|
## Common logic scenarios
|
||||||
|
|
||||||
### User joins an unitialized voice channel
|
### User joins an unitialized voice channel
|
||||||
|
|
@ -230,7 +234,7 @@ user join is here.
|
||||||
### User joining an (initialized) voice channel
|
### User joining an (initialized) voice channel
|
||||||
|
|
||||||
- Client sends VST\_CREATE
|
- Client sends VST\_CREATE
|
||||||
- **TODO**
|
- Server sends VST\_DONE
|
||||||
|
|
||||||
### User moves a channel
|
### User moves a channel
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -165,15 +165,9 @@ class VoiceManager:
|
||||||
await conn.send_info(info_type, info_data)
|
await conn.send_info(info_type, info_data)
|
||||||
|
|
||||||
async def _create_ctx_guild(self, guild_id, channel_id):
|
async def _create_ctx_guild(self, guild_id, channel_id):
|
||||||
chan = await self.app.storage.get_channel(channel_id)
|
|
||||||
|
|
||||||
await self._lvsp_info_guild(guild_id, 'CHANNEL_REQ', {
|
await self._lvsp_info_guild(guild_id, 'CHANNEL_REQ', {
|
||||||
'guild_id': str(guild_id),
|
'guild_id': str(guild_id),
|
||||||
'channel_id': str(channel_id),
|
'channel_id': str(channel_id),
|
||||||
|
|
||||||
'channel_properties': {
|
|
||||||
'bitrate': chan.get('bitrate', 96)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
async def _start_voice_guild(self, voice_key: VoiceKey, data: dict):
|
async def _start_voice_guild(self, voice_key: VoiceKey, data: dict):
|
||||||
|
|
@ -189,7 +183,7 @@ class VoiceManager:
|
||||||
if not channel_exists:
|
if not channel_exists:
|
||||||
await self._create_ctx_guild(guild_id, channel_id)
|
await self._create_ctx_guild(guild_id, channel_id)
|
||||||
|
|
||||||
await self._lvsp_info_guild(guild_id, 'VST_REQ', {
|
await self._lvsp_info_guild(guild_id, 'VST_CREATE', {
|
||||||
'user_id': str(user_id),
|
'user_id': str(user_id),
|
||||||
'guild_id': str(guild_id),
|
'guild_id': str(guild_id),
|
||||||
'channel_id': str(channel_id),
|
'channel_id': str(channel_id),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue