discord.lib
0.6.7
0.6.7
  • discord.lib Official Documentation
  • Credits
  • package
  • Packages
  • Premium Info
  • classes
    • message
    • login
    • joinMessage
    • Complete Examples
    • leaveMessage
    • serverGreeting
    • Attachments
    • sharding
    • Typings
    • exampleBot
    • kick
    • ban
    • webhookClient
    • musicClient
  • Interacting with discord.lib's client
    • client
    • bot activities
    • Do servercount in commands
    • Discord
  • guides
    • MusicClient Guide
  • Deprecated
    • userClient
    • Webhook
    • embed
Powered by GitBook
On this page
  • Make music system works
  • Install ffmpeg
  • Windows
  • Mac
  • Linux Command Line
  • Actual code
  • Install opusscript or node-opus for it to work
  • Using discord.lib to play music
  • Let's import packages first
  • Main code
  • Resulting code

Was this helpful?

  1. guides

MusicClient Guide

A powerful discord bot making library to help you make discord bots. Super easy, 100 percent discord api coverage, and more! Discord.lib also allows you to interact with discord.js.

PreviousDiscordNextuserClient

Last updated 5 years ago

Was this helpful?

Make music system works

Importing the packages needed using the following code

const { musicClient } = require("discord.lib")
require("node-opus or opusscript")

You should probably install ffmpeg since ffmpeg-binaries from npm might cause error, This function will not work on online services

Install ffmpeg

Windows

Download at

Mac

Download at

Linux Command Line

1. sudo apt update
2. sudo apt install ffmpeg
3. ffmpeg -version

Actual code

const { musicClient, login } = require("discord.lib")
musicClient("your prefix", "Youtube api key")
login("token", "game")

Install opusscript or node-opus for it to work

npm i node-opus/opusscript

Using discord.lib to play music

Let's import packages first

const { musicClient, login } = require("discord.lib")
require("node-opus or opusscript")

Main code

The main code is one of the function in discord.lib.

musicClient("your prefix", "yt-api-key")
login("token")

Resulting code

const { musicClient, login } = require("discord.lib")
require("node-opus or opusscript")
musicClient("your prefix", "yt-api-key")
login("token")

And you are all set!

https://ffmpeg.zeranoe.com/builds/
https://evermeet.cx/ffmpeg/