A modern Discord bot powered by the Shapes Inc API, with basic moderation and AI chat. The model is hardlocked to shapesinc/openaigpt5.
- AI Chat: Responds to messages using Shapes Inc API via OpenAI SDK.
- Contextual Replies: Replies to users as Discord replies (no ping).
- Owner System: Only bot owners can use sensitive commands (see below). Main owners are set in
.env(comma-separated), can add/remove lower-level owners via/ownercommand. - Moderation: Slash commands for blacklisting, whitelisting, purging, kicking, and banning users.
- Channel Modes: Activate or deactivate channels for full-message AI response.
- Logging Control: Toggle message response logging with
/logging onand/logging off. - Custom Status: Shows as "Watching ur mom" and always online. (edit the code to update)
- Neon Database: Uses Neon (Postgres) for persistent, production-ready storage.
- Node.js v16.x or higher
- NPM v7.x or higher
- A Discord bot token (Discord Developer Portal)
- A Shapes Inc API key (Shapes Inc)
- A Neon Postgres database (free tier works)
-
Clone the repository:
git clone https://github.com/hiidhruv/gpt5.git cd gpt5 -
Install dependencies:
npm install
-
Provision Neon (Postgres):
- Create a Neon project and database
- Copy the connection string and set it as
DATABASE_URLin.env
-
Create a
.envfile in the root directory:# Discord DISCORD_TOKEN=your_discord_bot_token # Shapes Inc SHAPESINC_API_KEY=your_shapes_api_key SHAPES_API_URL=https://api.shapes.inc/v1 # Neon Postgres DATABASE_URL=postgres://user:pass@host/db # Owner system OWNER_ID=your_discord_user_id # Main owner ID or comma-separated IDs
-
Run the bot:
npm run dev # For development (hot reload) npm start # For production
-
Invite the bot to your server using the OAuth2 URL from the Discord Developer Portal.
- The main owners are set via
OWNER_IDin your.envfile (comma-separated for multiple owners). - Only owners can use sensitive commands:
/blacklist,/whitelist,/bchannel,/wchannel,/api,/trigger,/owner
- The main owners can add or remove lower-level owners with the
/ownercommand. - All owners (main + lower-level) can use restricted commands.
/owner add <user>— Main owner can add a new owner/owner remove <user>— Main owner can remove an owner/owner list— List all current owners
/api status— Show current API settings (owners only)/api debug— Show API key status (server owner only)/wack— Clear message context for the current channel/blacklist <user>— Blacklist a user from using the AI (owners only)/whitelist <user>— Remove a user from the blacklist (owners only)/bchannel <channel>— Blacklist a channel from using the AI (manage messages permission)/wchannel <channel>— Remove a channel from the blacklist (manage messages permission)/activate— Make the bot respond to all messages in the current channel (manage messages permission)/deactivate— Make the bot follow normal response rules (manage messages permission)/logging <on|off>— Toggle message response logging in the console/purge <count>— Delete a number of messages/kick <user> [reason]— Kick a user/ban <user> [reason]— Ban a user/trigger set <word>— Change the bot's trigger word (owners only)/trigger get— Show the current trigger word (owners only)/owner add <user>— Add a lower-level owner (main owner only)/owner remove <user>— Remove a lower-level owner (main owner only)/owner list— List all owners