Play songs from your GDPS 24/7 on your Discord server!
  • JavaScript 100%
Find a file
2026-02-17 10:02:32 +01:00
commands Enhancements + database! 2025-09-19 18:28:38 +02:00
data/migrations Enhancements + database! 2025-09-19 18:28:38 +02:00
utils Enhancements + database! 2025-09-19 18:28:38 +02:00
.env.example initial commit 2025-09-16 21:18:23 +02:00
.gitignore Enhancements + database! 2025-09-19 18:28:38 +02:00
bot.js Public 2026-02-17 09:58:22 +01:00
LICENSE Public 2026-02-17 09:58:22 +01:00
package.json Public 2026-02-17 09:58:22 +01:00
README.md PHP endpoint improvements 2026-02-17 10:02:32 +01:00

Warning

This source code was never intended to be released publicly; expect it to be messy and uncommented.

gdps-radio-bot

Play songs from your GDPS 24/7 on your Discord server!

Previously ColdGDPS' music bot.

Prerequisites

  • Bun installed
  • A device/server capable of running 24/7
  • Full access to:
    • Your GDPS file server
    • Your Discord server (Administrator permissions)

Usage

You must have full permissions on both your Discord server and your GDPS server.

1. Create a Discord application and then a Discord bot from the Discord Developer Portal

  • Copy the bot's token (you will need it for the .env file)
  • Under the OAuth2 URL Generator:
    • Select bot
    • Select these permissions: Connect & Speak
  • Generate the invite link and add the bot to your server

2. Add a randomSong.php file anywhere on your GDPS file server (make sure to replace the require "path/to/incl/lib/connection.php"; line with the correct path on your server):

<?php
header("Content-Type: application/json");
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: GET");
require "path/to/incl/lib/connection.php";

$song = $db->prepare("SELECT * FROM songs WHERE isDisabled = 0 AND download != 'CUSTOMURL' ORDER BY RAND() ASC LIMIT 1");
$song->execute();
$song = $song->fetch();

$data = [
    "ID" => $song["ID"],
    "author" => $song["authorName"],
    "name" => $song["name"],
    "download" => $song["download"],
    "reuploadID" => $song["reuploadID"],
    "reuploadTime" => $song["reuploadTime"]
];

exit(json_encode([
    "dashboard" => true,
    "success" => true,
    "song" => $data
]));
?>

The file must be publicly accessible by the bot (via HTTP/HTTPS).

3. Download the repository on a device/server that can run 24/7 or clone it with:

git clone https://github.com/M336G/gdps-radio-bot.git
cd gdps-radio-bot

Then:

  • Install dependencies with bun install
  • Create a .env file
  • Fill it according to .env.example
    • Paste your Discord bot token
    • Set your GDPS endpoint URL accordingly (including http:// or https://)
    • Paste the channel ID in which the bot will play songs 24/7

Warning

Never share your .env file or bot token publicly.

4. Run bun run start in the bot's directory.

Make sure that:

  • The bot is online on Discord
  • It plays songs
  • The machine running it stays online 24/7

Optional: on the Discord Developer Portal, you may also disallow anyone from inviting the bot to their server by setting:

  • Installation Context to Guild Install only (in the Installation category)
  • Install Link to None (in the Installation category too)
  • Public Bot to false (in the Bot category)

Contributing

You are completely free to contribute to the project if you want to, it would be really appreciated!

License

This project is licensed under the MIT License.