Ejemplo n.º 1
0
 def event(self):
     return voice_events.VoiceServerUpdateEvent(
         app=None,
         shard=object(),
         guild_id=123,
         token="token",
         raw_endpoint="voice.discord.com:123")
Ejemplo n.º 2
0
 def deserialize_voice_server_update_event(
     self, shard: gateway_shard.GatewayShard, payload: data_binding.JSONObject
 ) -> voice_events.VoiceServerUpdateEvent:
     token = payload["token"]
     guild_id = snowflakes.Snowflake(payload["guild_id"])
     raw_endpoint = payload["endpoint"]
     return voice_events.VoiceServerUpdateEvent(
         app=self._app, shard=shard, guild_id=guild_id, token=token, raw_endpoint=raw_endpoint
     )