DiscordJS 13 user embed display last message sent in specific channel

I am building a profile slash command for discord.js 13. The command checks users roles and displays specific information about them. We are hoping to add the persons introduction from an introduction channel. Is there anyway to pull the last message sent from a user from a specific channel?

Current Code

        try{
        await guild.members.fetch();
        const member = guild.members.cache.get(UserOption.id);
        const roles = member.roles;
        const userFlags = UserOption.flags.toArray();
        const activity = UserOption.presence?.activities[0];
        //create the EMBED
        const embeduserinfo = new MessageEmbed()
        embeduserinfo.setThumbnail(member.user.displayAvatarURL({ dynamic: true, size: 512 }))
        embeduserinfo.setAuthor("Information about " + member.user.username + "#" + member.user.discriminator, member.user.displayAvatarURL({ dynamic: true }), "https://discord.gg/FQGXbypRf8")
        embeduserinfo.addField('**❱ Username**',`<@${member.user.id}>n`${member.user.tag}``,true)
        embeduserinfo.addField('**❱ Avatar**',`[`Link to avatar`](${member.user.displayAvatarURL({ format: "png" })})`,true)
        embeduserinfo.addField('**❱ Joined Discord**', "`"+moment(member.user.createdTimestamp).format("DD/MM/YYYY") + "`n" + "`"+ moment(member.user.createdTimestamp).format("hh:mm:ss") + "`",true)
        embeduserinfo.addField('**❱ Joined MetroVan**', "`"+moment(member.joinedTimestamp).format("DD/MM/YYYY") + "`n" + "`"+ moment(member.joinedTimestamp).format("hh:mm:ss")+ "`",true)            
        //DIRECT MESSAGE DISPLAY CODE
        if (roles.cache.find(r => r.id === "893305823315492914")) //dms are open
        {
            embeduserinfo.addField("**❱ DM STATUS**n`🔔 OPEN` ", "** **", true)
        }

Answer

async function searchForLastMessageFromUser(channel, userId) {
let messages = await channel.messages.fetch({before: null}, {cache: true});
while (messages.size > 0) {
    let result = messages.find(message => {
        return message.author.id === userId;
    });
    if (result !== null) return result;
    messages = await channel.messages.fetch({limit: 50, before: messages[messages.length - 1]}, {cache: true});
}
return null;

}

embeduserinfo.setDescription("**❱ INTRODUCTION**n" + introMessageText, "** Add your intro at <#885123781130067988>**");