Extending
Adding Custom Hooks
Pre-Launch Hook
Run custom logic before each launch:
export async function preLaunchHook(follower: Follower): Promise<boolean> {
// Return false to skip this follower
// Example: Skip followers with less than 100 followers
if (follower.followersCount < 100) {
logger.info(`Skipping ${follower.username}: too few followers`);
return false;
}
return true;
}Post-Launch Hook
Run custom logic after successful launch:
export async function postLaunchHook(follower: Follower, result: LaunchResult): Promise<void> {
// Example: Send Discord notification
await sendDiscordWebhook({
content: `🚀 New token launched!\n` +
`Follower: @${follower.username}\n` +
`Token: ${result.tokenSymbol}\n` +
`URL: ${result.pumpUrl}`,
});
}Adding New API Endpoints
Custom Token Logic
Modify src/lib/metadata.ts for custom naming:
