Skip to content
k27dongPublic

About

(竹): A Discord bot for streaming NetEase Cloud Music | 一个播放网易云音乐的Discord机器人

Topics

Resources

Stars

40 stars

Watchers

1 watching

Forks

Repository files navigation

折盡武昌柳,掛席上瀟湘。
二年魚鳥江上,笑我往來忙。
富貴何時休問,離別中年堪恨,憔悴鬢成霜。
絲竹陶寫耳,急羽且飛觴。

  ——辛棄疾

bamboo

A Discord bot for streaming NetEase Cloud Music

discord.js badge Support server badge Code quality badge

Overview

Bamboo is a Discord bot written in TypeScript that lets you stream music from NetEase Cloud Music. It is built with modern toolchain for efficiency and deployed on Vultr for reliable uptime.

中文文档

Installation

The official instance of Bamboo is hosted on a server that operates 24/7 with auto-restart capabilities. To introduce it to your server, click on the invite button above. For a more personalized and reliable experience, it is recommended to host your own instance of Bamboo.

Bamboo is actively developed and maintained. If you encounter any bugs or have suggestions, feel free to join the support server and share your feedback!

Join the Official Discord Server

Development

Prerequisites

  • mise: Installs the Node.js and pnpm versions pinned in mise.toml with mise install
  • ffmpeg: Required for audio processing and streaming

Usage

  1. pnpm install: Install dependencies
  2. create a .env file in the root directory with the format of .env.example, and fill in the required fields
  3. pnpm deploy:dev: register the slash commands in your development server (once, and again whenever commands change)
  4. pnpm dev: build and run the bot in development mode
  5. if no NetEase login is saved yet, a QR code appears in the terminal on the first run: scan it with the NetEase Cloud Music app to log in. The session is saved to cookies/netease.cookie and reused afterwards

Settings from Infisical

The settings can come from Infisical instead of a .env file. With the Infisical CLI installed, run infisical init in the root directory to link a project whose dev and prod environments hold the settings named in .env.example. The scripts use Infisical whenever .infisical.json is present, and the .env file otherwise.

Demo (Sound On)

Play songs from an album:

Demo.Album.mp4

Play songs from a user playlist

Demo.User.mp4

Play a song by its name:

Demo.Play.mp4

Display lyrics:

Demo.Lyric.mp4

Contributors

Contributor badge

About

(竹): A Discord bot for streaming NetEase Cloud Music | 一个播放网易云音乐的Discord机器人

Topics

Resources

Stars

40 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages