A modular Discord bot built with TypeScript and SapphireJS that randomly responds to messages with either memes from Reddit or images from a Pinterest board. This bot was entirely created by AI using Cursor's AI coding assistant.
- Randomly responds to messages with memes from Reddit's meme API
- Can alternatively respond with images from a specified Pinterest board
- Both meme and Pinterest responses can be toggled independently
- Built with TypeScript for type safety and better development experience
- Uses SapphireJS framework for modular command handling
- Owner-only command protection
- Detailed logging for debugging
- TypeScript
- Discord.js
- SapphireJS Framework
- Node-fetch for API calls
- Cheerio for Pinterest scraping
- Built entirely using AI assistance
-
Clone this repository:
git clone https://github.com/ChristianMorton/Meme-Bot cd rando-meme -
Install dependencies:
npm install
-
Create a
.envfile from the example:cp .env.example .env
-
Edit
.envand add your Discord bot token:DISCORD_TOKEN=your_discord_bot_token_here COMMAND_PREFIX=! -
Build the TypeScript code:
npm run build
-
Start the bot:
npm start
For development, you can use:
npm run devAll commands are restricted to the bot owner for security:
!toggle- Toggle automatic meme responses on/off!switch- Alias for toggle
!pinterest toggle- Toggle Pinterest responses on/off!pinterest set <url>- Set the Pinterest board URL!pinterest status- Check Pinterest settings!pin- Alias for pinterest commands
This bot was created entirely through AI assistance using Cursor's AI coding assistant. The development process included:
- Initial scaffolding of the TypeScript/SapphireJS project
- Implementation of the meme response system using the Reddit meme API
- Addition of Pinterest board scraping functionality
- Implementation of command handling and owner-only restrictions
- Error handling and logging system
- Modular design for easy expansion
The AI handled:
- Project structure setup
- Dependency management
- Type definitions
- API integration
- Command system implementation
- Error handling
- Documentation
DISCORD_TOKEN: Your Discord bot token (required)COMMAND_PREFIX: Custom prefix for commands (default: !)
- The bot requires the "Message Content Intent" to be enabled in your Discord Developer Portal
- Pinterest scraping is done client-side and may need adjustments if Pinterest's structure changes
- All commands are owner-only for security
- The bot ignores messages from other bots
- Command messages (starting with prefix) won't trigger meme/Pinterest responses
This bot was created by AI, but human contributions are welcome! Feel free to:
- Open issues for bugs or feature requests
- Submit pull requests for improvements
- Suggest new features or integrations
This project is open source and available under the MIT License.