A modern, single-process TypeScript rewrite of Samebot Neue. It keeps the fun conversational tone, emoji gimmicks, and meme-of-the-day posts while relying only on Discord + OpenAI (gpt-5.1 with web_search and gpt-image-1).
- Conversation brain – persona-aware replies for guild channels and DMs with smart mention/follow-up heuristics.
- Slash utilities –
/imggenerates art with Google’s Nano Banana Pro (gemini-3-pro-image-preview),/debugdumps the live context for the current channel. - Auto-react + reaction echo – lightweight emoji reactions powered by GPT and a Swift-style +1 port.
- Image of the day – daily meme prompt + caption scheduled for 8am America/Los_Angeles sent to a configurable channel.
- Zero microservices – Discord gateway, schedulers, and OpenAI access all run inside one Node process with strict typing and
neverthrowresults.
- Install dependencies
pnpm install
- Configure environment – copy
.env.exampleto.envand fill in values:DISCORD_TOKEN,DISCORD_APP_IDOPENAI_API_KEYGOOGLE_API_KEY(Google AI Studio key for Nano Banana Pro)MAIN_CHANNEL_ID(bot's home channel)IMAGE_OF_DAY_CHANNEL_ID(defaults toMAIN_CHANNEL_IDif omitted)
- Run locally
The bot registers slash commands on startup and begins processing events.
pnpm dev
- Build for production
pnpm build pnpm start
- Source lives under
src/grouped by domain (core,discord,features,openai). - All side effects use
neverthrowresults to avoidtry/catch; seesrc/openai/client.ts&src/discord/messenger.tsfor patterns. - Lint & tests:
pnpm lint pnpm test
- Reintroduce long-term memory or tasks as future modules.
- Expand heuristics for
web_searchtool usage once requirements solidify. - Add integration tests that mock Discord/OpenAI via
vitest+mswif needed.