Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
RamRamez committed Sep 9, 2024
1 parent 0a03c82 commit 91731f8
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions src/routes/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,24 @@ Please cast in a channel to praise`,
recipientName: praiseReceiver.username,
praiseHash: hash,
};

const reply = await neynarClient.publishCast(
process.env.SIGNER_UUID,
'Woo! Let\'s mint Praise attestation to your friends account 🎉 Thanks for helping to foster a culture of on-chain gratitude!',
{
embeds: [
{
url: process.env.APP_URL + '?' + new URLSearchParams(query),
},
],
replyTo: hash,
}
);
let reply;
try {
reply = await neynarClient.publishCast(
process.env.SIGNER_UUID,
'Woo! Let\'s mint Praise attestation to your friends account 🎉 Thanks for helping to foster a culture of on-chain gratitude!',
{
embeds: [
{
url: process.env.APP_URL + '?' + new URLSearchParams(query),
},
],
replyTo: hash,
}
);
} catch (e){
console.log("send frame error: " + e);
return new Response('Error: ' + e);
}
console.log("Replied with frame! Date: " + new Date() + ' hash: ' + reply.hash);
return new Response(`Replied to the cast with hash: ${reply.hash}`);
}
Expand Down

0 comments on commit 91731f8

Please sign in to comment.