Exemple #1
0
 def deserialize_guild_role_create_event(
         self, shard: gateway_shard.GatewayShard,
         payload: data_binding.JSONObject) -> role_events.RoleCreateEvent:
     role = self._app.entity_factory.deserialize_role(
         payload["role"],
         guild_id=snowflakes.Snowflake(payload["guild_id"]),
     )
     return role_events.RoleCreateEvent(shard=shard, role=role)
 def event(self):
     return role_events.RoleCreateEvent(app=None,
                                        shard=object(),
                                        role=mock.Mock(guilds.Role))