Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
A simple, powerful, and user-friendly music package for your Discord bot. Designed for DJS v14.
Note that this package is still under development, if you encounter any errors, please join the RemyK Discord server so that this problem can be fixed as soon as possible.
$ npm install @discordjs/opus ffmpeg
$ npm install musicord
Tweetnacl is recommended for better performance.
If you encounter installation errors, please refer to this page of the documentation
const { REST } = require('@discordjs/rest');
const { Routes } = require('discord-api-types/v9');
const { Client } = require('discord.js');
const { Musicord, ApplicationCommandSchema } = require('musicord');
const client = new Client({
intents: 32767
});
const commandsSchema = new ApplicationCommandSchema({
play: {
description: 'Play a song',
implemented: true,
options: {
name: 'link',
description: 'YouTube URL',
required: true,
type: 3
}
}
});
const musicordPlayer = new Musicord();
const rest = new REST({ version: '10' }).setToken('token');
(async () => {
try {
console.log('Started refreshing application (/) commands.');
await rest.put(
Routes.applicationGuildCommands('client id', 'guild id'),
{ body: commandsSchema.extract() },
)
console.log('Successfully reloaded application (/) commands.');
} catch (error) {
console.error(error);
}
})();
client.on('interactionCreate', (interaction) => {
if(!command.isCommand()) return;
if (interaction.commandName === 'play') {
const msgArgs = interaction.options.get('link').value
if (!msgArgs) return interaction.reply('Argument required');
const msgMember = interaction.guild.members.cache.get(interaction.member.user.id);
if (msgMember && msgMember.voice.channel) {
if (musicordPlayer.existQueue(interaction.guild)) {
const queue = musicordPlayer.getQueue(interaction.guild);
if (queue) await queue.play(msgArgs, msgMember.voice.channel);
const queueInfo = musicordPlayer.getQueueInfo(interaction.guild);
if (queueInfo && queue) interaction.reply(`${queueInfo.songs[1].title} has been added to the queue`)
} else {
const queue = musicordPlayer.initQueue(interaction.guild, {
textChannel: interaction.channel ,
voiceChannel: msgMember.voice.channel
});
if (queue) {
interaction.deferReply();
await queue.play(msgArgs, msgMember.voice.channel)
}
const queueInfo = musicordPlayer.getQueueInfo(interaction.guild);
if (queueInfo) return await interaction.editReply(`Playing ${queueInfo.songs[0].title}`)
}
}
}
});
client.login('token');
Before creating an issue, be sure that it has not already been deferred and try to come up with a simple approach to the issue so that deferral is accessible to all.
In order to submit a PR, make sure you have read the contribution guide
Thanks a lot to ArthurLeo who supported me during the development of this project, and who helps me daily to maintain it.
I would also like to thank all the amazing members of my server who are helping to make this project happen !
Note: This package is not affiliated with Discord Inc. or YouTube Inc.
This package is under Apache-2.0 license.
FAQs
A simple, powerful, and user-friendly music package for your Discord bot. Designed for DJS v14.
We found that musicord demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.