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 52c2ee4 commit 2cfb88d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ if (typeof Bun !== 'undefined') {
fetch: async (req) => {
try {
const url = new URL(req.url);
console.log("Received request! Date: " + new Date());
switch (url.pathname) {
case routes.home:
return new Response('This is my Farcaster praise bot', { status: 200 });
Expand Down
1 change: 1 addition & 0 deletions src/routes/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +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 + ' mentioned_profiles: ' + mentioned_profiles);
if (author.username === process.env.PRAISE_FARCASTER_HANDLE) {
// The bot should not reply to itself
return new Response('The bot should not reply to itself', { status: 200 });
Expand Down

0 comments on commit 2cfb88d

Please sign in to comment.