2.0.5 • Published 1 year ago
sussy-dc-player v2.0.5
Sussy DC Player
sussy-dc-player is a simple discord.js music player. It is compatible with discord.js v13 and later.
Dependencies
discord.js will not be installed with this package you have to install it manually
@discordjs/voice has dependencies which don't get installed automatically
Encryption Libraries:
- sodium-native: ^3.3.0
- sodium: ^3.0.2
- tweetnacl: ^1.0.3
- libsodium-wrappers: ^0.7.9
FFmpeg:
- ffmpeg-static: ^4.2.7
Example
const { Client, GatewayIntentBits } = require("discord.js");
const { Player } = require("sussy-dc-player");
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildVoiceStates,
]
});
const config = {
prefix: "!",
token: "your token"
}
const player = new Player({
leaveOnQueueEnd: true,
client: client
});
client.on("messageCreate", (message) => {
if (!message.content.startsWith(config.prefix) || message.author.bot) return;
const args = message.content.slice(config.prefix.length).trim().split(/ +/);
const command = args.shift().toLowerCase();
if (!command) return;
if (command === "play") {
const queue = player.getCreateQueue(message.guild, message.member.voice.channel);
queue.addTrack(args.join(" ").trim(), message.author, message.channel);
message.channel.send(`Loading track for: ${args.join(" ")}`);
}
if(command === "loop") {
const queue = player.getQueue(message.guild);
if(!queue) return message.channel.send("❌ | There is currently no music running.");
queue.toggleLoop();
message.channel.send(`✅ | Looping ${queue.loop? "enabled":"disabled"}.`);
}
});
client.on("ready", () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.login(config.token);
A bigger Example can be found here: https://github.com/roteKlaue/sussy-dc-player/blob/master/example/index.js
2.0.5
1 year ago
2.0.4
1 year ago
2.0.3
1 year ago
2.0.1
1 year ago
2.0.0
1 year ago
1.0.1-dev-beta.0.4.1
1 year ago
1.0.1-dev-beta.0.4.0
1 year ago
1.0.1-dev-beta.0.3.0
1 year ago
1.0.1-dev-beta.0.2.7
1 year ago
1.0.1-dev-beta.0.2.7.2857
1 year ago
1.0.1-dev-beta.0.2.7.1460
1 year ago
1.0.1-dev-beta.0.2.7.1397
1 year ago
1.0.1-dev-beta.0.2.3.9599
1 year ago
1.0.1-dev-beta.0.2.3.9430
1 year ago
1.0.1-dev-beta.0.2.3.9275
1 year ago
1.0.1-dev-beta.0.2.3.9271
1 year ago
1.0.1-dev-beta.0.2.3.9270
1 year ago
1.0.1-dev-beta.0.2.1.8790
1 year ago
1.0.1-dev-beta.0.1.1.3344
1 year ago
1.0.0
1 year ago