Esempio n. 1
0
    async def test_on_resumed(self, event_manager, app, shard, payload):
        expected_dispatch = shard_events.ShardResumedEvent(app=app,
                                                           shard=shard)

        await event_manager.on_resumed(shard, payload)

        event_manager.dispatch.assert_awaited_once_with(expected_dispatch)
Esempio n. 2
0
 async def on_resumed(self, shard: gateway_shard.GatewayShard, _: data_binding.JSONObject) -> None:
     """See https://discord.com/developers/docs/topics/gateway#resumed for more info."""
     # TODO: this should be in entity factory
     await self.dispatch(shard_events.ShardResumedEvent(app=self._app, shard=shard))
Esempio n. 3
0
 def deserialize_resumed_event(
         self, shard: gateway_shard.GatewayShard
 ) -> shard_events.ShardResumedEvent:
     return shard_events.ShardResumedEvent(app=self._app, shard=shard)