mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-08 10:53:10 +00:00
Update voice code to vws V4
- Update internals to be compatible with v4 - Adds multiple encryption mode support. Previously only `xsalsa20_poly1305` was supported. Now `xsalsa20_poly1305_suffix` is also supported. Note: There is no (nice) way to manually select a mode. The user needn't worry about this however. - Fixed speaking state bug. When you disconnected from a voice channel while a bot was playing, upon reconnect you would be unable to hear the bot. This was caused by bots not sending their speaking state while transmitting. Bots will now set their speaking state properly when transmitting. Note: This does not account for sending actual silence, the speaking indicator will still be active.
This commit is contained in:
@ -26,10 +26,10 @@ DEALINGS IN THE SOFTWARE.
|
||||
|
||||
from enum import Enum, IntEnum
|
||||
|
||||
__all__ = ['ChannelType', 'MessageType', 'VoiceRegion', 'VerificationLevel',
|
||||
'ContentFilter', 'Status', 'DefaultAvatar', 'RelationshipType',
|
||||
'AuditLogAction', 'AuditLogActionCategory', 'UserFlags',
|
||||
'ActivityType', 'HypeSquadHouse', 'NotificationLevel']
|
||||
__all__ = ['ChannelType', 'MessageType', 'VoiceRegion', 'SpeakingState',
|
||||
'VerificationLevel', 'ContentFilter', 'Status', 'DefaultAvatar',
|
||||
'RelationshipType', 'AuditLogAction', 'AuditLogActionCategory',
|
||||
'UserFlags', 'ActivityType', 'HypeSquadHouse', 'NotificationLevel']
|
||||
|
||||
class ChannelType(Enum):
|
||||
text = 0
|
||||
@ -75,6 +75,15 @@ class VoiceRegion(Enum):
|
||||
def __str__(self):
|
||||
return self.value
|
||||
|
||||
class SpeakingState(IntEnum):
|
||||
none = 0
|
||||
voice = 1
|
||||
soundshare = 2
|
||||
priority = 4
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
class VerificationLevel(IntEnum):
|
||||
none = 0
|
||||
low = 1
|
||||
|
Reference in New Issue
Block a user