Skip to content

A music and radio bot using discord.js and discord-player.

License

Notifications You must be signed in to change notification settings

Hoshimichan/Blue-radio

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

discord-music-and-radio-bot

Yet another open source Discord bot using discord-player and discord.js.

Warning, this code uses the v12 of the Discord.js module. Previous versions of discord.js will not be supported.

Issues

If you have any issue feel free to make a new issue here.

Installation

Use the package manager npm to install all the packages. Using npm install, will automatically install all the package needed. Make sure your node version is not below 12.

Configuration

Start by editing the Config/botconfig.json file:

{
  "prefix":"Your Bot Prefix",
  "embed":"Hex Colour",
  "error":"Hex Colour",
  "owner":["Your ID"]
}

Please do not mess with the config.json file inside the Config folder.

After you have finished editing the botconfig.json file, edit the .env file:

token=YOUR_TOKEN_HERE

Reminder:

  • prefix, the prefix that will be set to use the bot.
  • YOUR_TOKEN_HERE, the token of the bot available on the Discord Developers section.
  • embed & error, the embed colours your bot will use in embeds. Click here to get link to a colour picker.
  • owner, your ID to access developer-only commands if need be, to get your ID please refer to this Discord article.

Commands

  • play <name>, plays a song in a voice channnel.
  • pause, pauses the current song.
  • clear-queue, deletes the upcoming songs in the queue.
  • now-playing, see the currently playing song.
  • repeat repeats a song over and over again.
  • radio, listen to your favourite radio stations live.

Utilities

Functions available with the discord-player module that you can use :

// Play a song in the voice channel and init the guild queue
client.player.play(voiceChannel, songName);

// Add a song to the queue
client.player.addToQueue(guildID, songName);
// Clear the queue
client.player.clearQueue(guildID);
// Get the queue
client.player.getQueue(guildID);
// Skip the current song
client.player.skip(guildID);


// Pause
client.player.pause(guildID);
// Resume
client.player.resume(guildID);
// Stop
client.player.stop(guildID);

// Check if music is playing in a guild
client.player.isPlaying(guildID);
// Get the currently playing song
client.player.nowPlaying(guildID);


// Current song will be repeated indefinitely
client.player.setRepeatMode(true);
// Current song will no longer be repeated indefinitely
client.player.setRepeatMode(false);

License

MIT

Acknowledgements & Thank Yous

I <3 Open Source, so I'd like to acknowledge the brilliant packages making this repository happen.

These are the open source libraries I use to make this bot:

Thank you to:

I used both of your repositories as a help guide for making this repository, hope you don't mind guys.

About

A music and radio bot using discord.js and discord-player.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%