1.0.6 • Published 3 years ago

cosmic-music v1.0.6

Weekly downloads
8
License
ISC
Repository
-
Last release
3 years ago

Cosmic Music

Want to make a discord.js music bot? Well, you've come to the right place.

Installation

npm i cosmic-music

Features

  • Uses LavaLink
  • Easy to use

This package uses shoukaku.

Examples

const { CosmicMusic } = require("cosmic-music");
const Client = new (require("discord.js").Client)();

Client.music = new CosmicMusic([{
  name: `node1`,
  auth: `youshallnotpass`,
  host: `localhost`,
  port: 2333,
}], Client);

Client.on("message", async (message) => {
  if (message.author.bot || !message.guild) return;
  const [cmd, ...args] = message.content.trim().split(/ +/g);
  switch (cmd.toLowerCase()) {
    case "play":
      if (!args.join(" ")) return message.channel.send("Missing query!");
      const Result = await client.music.play(message, `youtube`, args.join(" "));
      if (!Result) return;
      message.channel.send(`Now playing: ${Result.info.title}`);
      break;
  }
});

You can join the support server here!

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago