{"id":29898523,"url":"https://github.com/krithiv-7/ghostdiscordbot","last_synced_at":"2025-08-01T11:39:54.735Z","repository":{"id":305657181,"uuid":"1023498514","full_name":"Krithiv-7/GhostDiscordBot","owner":"Krithiv-7","description":"A feature-rich Discord bot that automatically posts Ghost blog articles to your Discord server with smart notifications, role pinging, and powerful content discovery tools.","archived":false,"fork":false,"pushed_at":"2025-07-21T09:31:17.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-21T11:25:07.988Z","etag":null,"topics":["discord","discord-bot","discord-js","ghost","ghost-api","ghost-blog","ghost-cms"],"latest_commit_sha":null,"homepage":"http://ghostdc.krithiv.dev","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Krithiv-7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-21T08:52:01.000Z","updated_at":"2025-07-21T10:28:01.000Z","dependencies_parsed_at":"2025-07-21T11:37:32.663Z","dependency_job_id":null,"html_url":"https://github.com/Krithiv-7/GhostDiscordBot","commit_stats":null,"previous_names":["krithiv-7/ghostdiscordbot"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Krithiv-7/GhostDiscordBot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Krithiv-7%2FGhostDiscordBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Krithiv-7%2FGhostDiscordBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Krithiv-7%2FGhostDiscordBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Krithiv-7%2FGhostDiscordBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Krithiv-7","download_url":"https://codeload.github.com/Krithiv-7/GhostDiscordBot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Krithiv-7%2FGhostDiscordBot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268215611,"owners_count":24214365,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discord","discord-bot","discord-js","ghost","ghost-api","ghost-blog","ghost-cms"],"created_at":"2025-08-01T11:39:45.639Z","updated_at":"2025-08-01T11:39:54.726Z","avatar_url":"https://github.com/Krithiv-7.png","language":"JavaScript","readme":"# Ghost Discord Bot\n\nA powerful Discord bot that integrates with the Ghost Content API to automatically post new and updated articles to your Discord server. Perfect for Ghost bloggers, content creators, and communities who want to stay updated with the latest posts.\n\n## ✨ Features\n\n### 🔄 Automatic Content Syncing\n- **Real-time monitoring** - Checks for new posts every 5 minutes\n- **Smart detection** - Identifies both new posts and updated existing posts\n- **Duplicate prevention** - Advanced caching system prevents duplicate notifications\n- **Flexible modes** - Choose between \"New \u0026 Updated\" or \"New Posts Only\"\n\n### 🎯 Customizable Notifications\n- **Role pinging** - Optionally ping specific roles when new posts are published\n- **Beautiful embeds** - Rich embeds with post title, excerpt, author, and featured image\n- **Color coding** - Green embeds for new posts, yellow for updated posts\n- **Proper dates** - Shows actual publication dates instead of relative time\n\n### 🛠️ Easy Management\n- **Simple setup** - One command to get started\n- **Granular editing** - Modify individual settings without full reconfiguration\n- **Multi-server support** - Each Discord server has its own independent configuration\n- **Admin controls** - All management commands require \"Manage Server\" permissions\n\n### 🔍 Content Discovery\n- **Search functionality** - Find posts by title across your Ghost site\n- **Tag browsing** - Browse posts by tags with smart autocomplete\n- **API diagnostics** - Test connectivity to your Ghost site\n\n## 🚀 Quick Start\n\n### Prerequisites\n- Node.js 16.0.0 or higher\n- A Discord bot token from the [Discord Developer Portal](https://discord.com/developers/applications)\n- A Ghost site with Content API access\n\n### Installation\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/krithiv-7/GhostDiscordBot.git\n   cd GhostDiscordBot\n   ```\n\n2. **Install dependencies**\n   ```bash\n   npm install\n   ```\n\n3. **Configure environment variables**\n   ```bash\n   cp .env.example .env\n   ```\n   \n   Edit `.env` and add your Discord bot credentials:\n   ```env\n   DISCORD_TOKEN=your_discord_bot_token_here\n   CLIENT_ID=your_client_id_here\n   ```\n\n4. **Deploy slash commands**\n   ```bash\n   node deploy-commands.js\n   ```\n\n5. **Start the bot**\n   ```bash\n   node index.js\n   ```\n\n### Bot Permissions\n\nWhen inviting the bot to your server, make sure it has these permissions:\n- `Send Messages`\n- `Use Slash Commands`\n- `Embed Links`\n- `Attach Files`\n- `Read Message History`\n\n**Permission Integer:** `2147485696`\n\n### Invite Link Template\n```\nhttps://discord.com/api/oauth2/authorize?client_id=YOUR_CLIENT_ID\u0026permissions=2147485696\u0026scope=bot%20applications.commands\n```\n\n## 📖 Commands\n\n### General Commands (Available to everyone)\n\n| Command | Description |\n|---------|-------------|\n| `/ping` | Check the bot's latency |\n| `/help` | Display all available commands |\n| `/ping-ghost` | Test connection to your Ghost site |\n| `/search \u003ctitle\u003e` | Search for posts by title |\n| `/tag \u003ctag\u003e` | Find posts by tag (with autocomplete) |\n\n### Admin Commands (Requires \"Manage Server\" permission)\n\n| Command | Description |\n|---------|-------------|\n| `/setup` | Initial Ghost integration setup |\n| `/edit-setup` | Edit individual configuration settings |\n| `/test-run` | Manually trigger a check for new posts |\n| `/remove` | Remove server configuration and data |\n\n## ⚙️ Configuration\n\n### Initial Setup\n\nUse the `/setup` command to configure the bot for your server:\n\n```\n/setup api_url:https://yoursite.com api_key:your_content_api_key channel:#your-channel mode:default ping_role:@subscribers\n```\n\n**Parameters:**\n- `api_url` - Your Ghost site URL (e.g., `https://yoursite.com`)\n- `api_key` - Your Ghost Content API Key\n- `channel` - Discord channel where posts will be sent\n- `mode` (optional) - `default` (new \u0026 updated) or `new_only`\n- `ping_role` (optional) - Role to ping when new posts are published\n\n### Getting Your Ghost API Key\n\n1. Go to your Ghost Admin panel\n2. Navigate to **Settings** → **Integrations**\n3. Click **Add custom integration**\n4. Copy the **Content API Key**\n\n### Editing Configuration\n\nUse `/edit-setup` to modify individual settings:\n\n- `/edit-setup url` - Update Ghost site URL\n- `/edit-setup key` - Update API key\n- `/edit-setup channel` - Change posting channel\n- `/edit-setup mode` - Switch between posting modes\n- `/edit-setup ping-role` - Add/remove role pinging\n\n## 🏗️ Project Structure\n\n```\nGhostDiscordBot/\n├── commands/           # Slash command files\n│   ├── setup.js       # Initial configuration\n│   ├── edit-setup.js  # Settings management\n│   ├── help.js        # Command help\n│   ├── ping.js        # Latency check\n│   ├── search.js      # Post search\n│   ├── tag.js         # Tag browsing\n│   ├── test-run.js    # Manual post check\n│   ├── remove.js      # Data removal\n│   └── ping-ghost.js  # API diagnostics\n├── database.js        # SQLite database management\n├── deploy-commands.js # Command deployment script\n├── ghost.js          # Ghost API integration\n├── index.js          # Main bot file\n├── scheduler.js      # Automatic post checking\n├── package.json      # Dependencies\n├── .env.example      # Environment template\n├── .gitignore        # Git exclusions\n└── README.md         # This file\n```\n\n## 🗄️ Database\n\nThe bot uses SQLite to store:\n- **Server configurations** - API keys, channels, settings per Discord server\n- **Published posts cache** - Prevents duplicate notifications\n- **Optimized indexes** - Fast queries even with large datasets\n\nDatabase file: `ghost.db` (automatically created)\n\n## 🔧 Development\n\n### Running in Development Mode\n\nFor faster testing during development, you can use guild-specific commands:\n\n1. Add your guild ID to `.env`:\n   ```env\n   GUILD_ID=your_guild_id_here\n   ```\n\n2. Modify `deploy-commands.js` to use guild commands:\n   ```javascript\n   Routes.applicationGuildCommands(process.env.CLIENT_ID, process.env.GUILD_ID)\n   ```\n\nGuild commands update instantly, while global commands can take up to an hour.\n\n### Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Test thoroughly\n5. Submit a pull request\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## 🤝 Support\n\nIf you encounter any issues or have questions:\n\n1. Check the [Issues](https://github.com/krithiv-7/GhostDiscordBot/issues) page\n2. Create a new issue with detailed information\n3. Include your Ghost version and any error messages\n\n## 🙏 Acknowledgments\n\n- Built with [discord.js](https://discord.js.org/)\n- Powered by [Ghost Content API](https://ghost.org/docs/content-api/)\n- Database powered by [better-sqlite3](https://github.com/WiseLibs/better-sqlite3)\n\n---\n\n**Made with ❤️ for the Ghost Community**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrithiv-7%2Fghostdiscordbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrithiv-7%2Fghostdiscordbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrithiv-7%2Fghostdiscordbot/lists"}