{"id":22310333,"url":"https://github.com/AlexanderWyss/discord-bot-node","last_synced_at":"2025-07-29T07:32:54.643Z","repository":{"id":38454978,"uuid":"210431162","full_name":"AlexanderWyss/discord-bot-node","owner":"AlexanderWyss","description":"Discord music bot with webinterface","archived":false,"fork":false,"pushed_at":"2023-03-01T04:39:30.000Z","size":2386,"stargazers_count":42,"open_issues_count":17,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-07T00:09:35.449Z","etag":null,"topics":["bot","discord","discord-bot","discord-bot-website","discord-docker","discord-gui","discord-music-bot","discord-website","discordjs","discordjs-bot","discordjsbot","docker","gui","music","music-bot","music-bot-discord","webinterface","website"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlexanderWyss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-23T19:02:42.000Z","updated_at":"2023-03-01T16:41:41.000Z","dependencies_parsed_at":"2023-02-08T07:16:24.051Z","dependency_job_id":null,"html_url":"https://github.com/AlexanderWyss/discord-bot-node","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/AlexanderWyss/discord-bot-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexanderWyss%2Fdiscord-bot-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexanderWyss%2Fdiscord-bot-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexanderWyss%2Fdiscord-bot-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexanderWyss%2Fdiscord-bot-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexanderWyss","download_url":"https://codeload.github.com/AlexanderWyss/discord-bot-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexanderWyss%2Fdiscord-bot-node/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267646055,"owners_count":24120931,"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-07-29T02:00:12.549Z","response_time":2574,"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":["bot","discord","discord-bot","discord-bot-website","discord-docker","discord-gui","discord-music-bot","discord-website","discordjs","discordjs-bot","discordjsbot","docker","gui","music","music-bot","music-bot-discord","webinterface","website"],"created_at":"2024-12-03T21:01:17.109Z","updated_at":"2025-07-29T07:32:54.624Z","avatar_url":"https://github.com/AlexanderWyss.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Discord Music Bot with Website\n\n## Demo\n[Discord Server](https://discord.gg/7v9jSsukYw)\n\n[Web UI](https://discord-demo.wyss.tech/player/790550663280459786)\n\n## Build \u0026 Run\n\n[Create bot, get token and add to Discord server](https://github.com/AlexanderWyss/discord-bot-node/blob/master/DiscordBotREADME.md)\n\nNode.js 16.13.0 or newer is required.\n\nCreate .env file or set environment variables in commandline and add NODE_ENV=production to disable .env file.\n```\nTOKEN=\u003cdiscord token\u003e\nOWNER=\u003cDiscord owner User Id\u003e\nURL=\u003curl/ip of this server in format http(s)://foo.bar:port\u003e\nPORT=\u003cport to start server on, default: 3000\u003e\nDEFAULT_VOLUME=\u003c0-150, default: 20\u003e\nRADIO_MAX_VIDEO_LENGTH=\u003clength in seconds, 0 for no max length, default: 600, will exclude all songs longer than the duration from the radio.\u003e\nAUTO_LEAVE_TIMEOUT=\u003clength in seconds, -1 to disable, Default: 60, will make the bot leave after the given amount of time, if he is alone.\u003e\nRESUME_ON_BOT_JOIN=\u003ctrue/false, default: false, whether the bot resumes music playback when he joins a channel.\u003e\nPAUSE_ON_USER_LEAVE\u003ctrue/false, default: true, whether the bots pauses music playback when he is alone.\u003e\nRESUME_ON_USER_JOIN=\u003ctrue/false, default: true, whether the bots resumes music playback when he is no longer alone.\u003e\n```\n\nBuild the server first then the client.\n```\n\u003e npm install\n\u003e npm run build\nclient\u003e npm install\nclient\u003e npm run build:prod\n\u003e node ./bin/www\n```\n\nIf the client was build without prod flag it will always access the server via localhost:3000 (for development).\n\n## Deploy with replit\nReplit is a free and easy way to deploy the bot for yourself.\n\nThis project was not designed for replit. The provided configuration is only meant to deploy it.\n\nWith the free version you may be limited by the available resources. \nThe client cannot be built because it will run out of ram. \nDue to this the client will automatically be downloaded from the releases of this git repo.\n\n### Step by Step\n1. Create a free replit account. [SignUp](https://replit.com/signup)\n2. Follow the instructions of [Create bot, get token and add to Discord server](https://github.com/AlexanderWyss/discord-bot-node/blob/master/DiscordBotREADME.md)\n3. [Deploy to replit](https://repl.it/github/AlexanderWyss/discord-bot-node)\n4. Change Language from \"TypeScript\" to \"Blank Repl\" and Import from GitHub\n![Web UI](https://raw.githubusercontent.com/AlexanderWyss/README-assets/master/replit_import.png)\n5. Open Secrets in the Tools menu\n![Secrets](https://raw.githubusercontent.com/AlexanderWyss/README-assets/master/replit_secrets.png)\n6. Add following Secrets (key : value)\n   - NODE_ENV : production\n   - TOKEN : {token from step 2}\n   - OWNER : {owner id from step 2}\n   - URL : https://{replit name}.{replit username}.repl.co\n     - eg. https://discord-bot-node.awyss.repl.co\n       ![Run](https://raw.githubusercontent.com/AlexanderWyss/README-assets/master/replit_secrets_list.png)\n7. Run\n![Run](https://raw.githubusercontent.com/AlexanderWyss/README-assets/master/replit_run.png)\n8. Be patient.\n   - Once the message \"Logged in\" appears in the console it's running, and a webview should open automatically.\nFrom this webview you can double check your configured URL.\n9. Open Discord and go to the server you added the bot to in step 2.\n10. Send \"!RegisterCommands\" to a text chat of that server.\n    - In the replit console it should print \"Successfully registered X commands.\"\n11. Enjoy.\n    - The very first song will take quite some time to load, after that the speed should be reasonable.\n\n\n## Docker\nOr run with Docker:\n```\ndocker run -d -p 80:80 --restart unless-stopped --name discord-bot-node -e NODE_ENV=production -e PORT=80 -e TOKEN=\u003cdiscord token\u003e -e OWNER=\u003cdiscord owner id\u003e -e URL=\u003curl/ip e.g http(s)://foo.bar:port\u003e alexanderwyss/discord-bot-node:latest\n```\n[Docker Hub](https://hub.docker.com/r/alexanderwyss/discord-bot-node)\n\n## Slash Commands\nSlash commands are a way to interact with the bot through discord. Start typing / to see a list of available commands.\n\nThe slash commands must initially be registered with \"!RegisterCommands\".\n- It can only be done by the bot owner, as defined by the env variable OWNER.\n- It can be done in any text channel of a guild.\n- It must be done for every guild separately.\n- It should be repeated after every update of the bot.\n\n## Web UI\nThe Web UI can be used by multiple users concurrently.\n- Search YouTube\n- Manage your playlist with drag and drop\n- Seek in song\n- Make the bot join a voice channel or leave it\n- Light/Dark mode\n- Adjust volume\n- ...\n\n![Web UI](https://raw.githubusercontent.com/AlexanderWyss/README-assets/master/discord-bot-node-web-ui.png)\n\n### Keyboard Shortcuts:\n* `\u003cctrl\u003e + f` Focus search\n* While searchbar focused:\n    * `\u003center\u003e` Search\n    * `\u003cctrl\u003e + \u003center\u003e` Play first result now\n    * `\u003cctrl\u003e + \u003cshift\u003e + \u003center\u003e` Play first result next\n    * `\u003cshift\u003e + \u003center\u003e` Queue first result\n\nTested with Firefox \u0026 Chrome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexanderWyss%2Fdiscord-bot-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAlexanderWyss%2Fdiscord-bot-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexanderWyss%2Fdiscord-bot-node/lists"}