Create a Farcaster bot on Neynar in a few quick steps
farcaster-examples
repo, gm_bot
is an automated messaging bot designed to cast a ‘gm ’ message in Warpcast every day at a scheduled time. The bot operates continuously as long as the system remains online. It leverages Neynar API and is built using @neynar/nodejs-sdk.
Install PM2
Install Project Dependencies
Configure Environment Variables
.env
file to add your NEYNAR_API_KEY
and FARCASTER_BOT_MNEMONIC
. Optionally, you can also specify PUBLISH_CAST_TIME
and TIME_ZONE
for custom scheduling.fidOwner
, keyType
, key
, metadataType
, metadata
, deadline
, sig
in your terminal logs. Navigate to addFor
function and add following values inside the respective placeholders.Start the Bot
Verify the Process
View Logs
Stopping the Bot
gm_bot
is released under the MIT License. This license permits free use, modification, and distribution of the software, with the requirement that the original copyright and license notice are included in any substantial portion of the work.
What if gm_bot stops sending messages?
TIME_ZONE
, also ensure that the process is running.