def to_dict(self) -> MessageReferencePayload:
    result: Dict[(str, Any)] = ({'message_id': self.message_id} if (self.message_id is not None) else {})
    result['channel_id'] = self.channel_id
    if (self.guild_id is not None):
        result['guild_id'] = self.guild_id
    if (self.fail_if_not_exists is not None):
        result['fail_if_not_exists'] = self.fail_if_not_exists
    return result
def to_dict(self) -> MessageReferencePayload:
    result: Dict[(str, Any)] = ({'message_id': self.message_id} if (self.message_id is not None) else {})
    result['channel_id'] = self.channel_id
    if (self.guild_id is not None):
        result['guild_id'] = self.guild_id
    if (self.fail_if_not_exists is not None):
        result['fail_if_not_exists'] = self.fail_if_not_exists
    return result