Skip to content

Commit

Permalink
fix undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
RamRamez committed Sep 10, 2024
1 parent 15cfbee commit a0c606f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const bot = async (req: Request) => {
const body = await req.text();
const hookData = JSON.parse(body);
const { channel, author, text, mentioned_profiles, hash } = hookData.data;
console.log("/bot received new request! Date: " + new Date() + ' hash: ' + hash + ' author: ' + author.username + ' text: ' + text + ' channel: ' + channel.name);
console.log("/bot received new request! Date: " + new Date() + ' hash: ' + hash + ' author: ' + author?.username + ' text: ' + text + ' channel: ' + channel?.name);
if (author.username === process.env.PRAISE_FARCASTER_HANDLE) {
// The bot should not reply to itself
console.log("The bot should not reply to itself! Date: " + new Date());
Expand Down

0 comments on commit a0c606f

Please sign in to comment.