@classmethod
def with_state(cls, state: ConnectionState, data: MessageReferencePayload) -> Self:
    self = cls.__new__(cls)
    self.message_id = utils._get_as_snowflake(data, 'message_id')
    self.channel_id = int(data.pop('channel_id'))
    self.guild_id = utils._get_as_snowflake(data, 'guild_id')
    self.fail_if_not_exists = data.get('fail_if_not_exists', True)
    self._state = state
    self.resolved = None
    return self
@classmethod
def with_state(cls, state: ConnectionState, data: MessageReferencePayload) -> Self:
    self = cls.__new__(cls)
    self.message_id = utils._get_as_snowflake(data, 'message_id')
    self.channel_id = int(data.pop('channel_id'))
    self.guild_id = utils._get_as_snowflake(data, 'guild_id')
    self.fail_if_not_exists = data.get('fail_if_not_exists', True)
    self._state = state
    self.resolved = None
    return self