All Projects → skick1234 → Distube

skick1234 / Distube

Licence: mit
A Discord.js v12 module to simplify your music commands and play songs with audio filters on Discord without any API key. Support YouTube, SoundCloud, Bandcamp, Facebook, and 700+ more sites

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Distube

Botify
Discord bot that plays Spotify tracks and YouTube videos or any URL including Soundcloud links and Twitch streams
Stars: ✭ 86 (+17.81%)
Mutual labels:  discord-bot, soundcloud, music, discord, youtube
Discord Player
🎧 Complete framework to simplify the implementation of music commands using discords.js v12
Stars: ✭ 161 (+120.55%)
Mutual labels:  bot, search, music, discord, youtube
Discord.js Musicbot Addon
This DOES NOT WORK any more. This repo only serves as an archive for is anyone wants to pickup my work. You may still join the discord however.
Stars: ✭ 109 (+49.32%)
Mutual labels:  bot, discord-bot, music, discord, youtube
Scrape Youtube
A lightning fast package to scrape YouTube search results. This was made and optimized for Discord Bots.
Stars: ✭ 43 (-41.1%)
Mutual labels:  bot, search, discord, youtube
Jeelangamusic
Discord bot with music functional. Play, skip, save music and etc!
Stars: ✭ 40 (-45.21%)
Mutual labels:  discord-bot, music, discord, youtube
Misaki
Misaki is Discord Bot designed for communities with commands ranging from gif based anime reactions, to head scratching trivia commands.
Stars: ✭ 78 (+6.85%)
Mutual labels:  bot, discord-bot, music, discord
Music Bot
Simple music bot with a full-blown queue system that is easy to understand
Stars: ✭ 102 (+39.73%)
Mutual labels:  bot, discord-bot, music, discord
Pengubot
Official PenguBot GitHub Repository
Stars: ✭ 98 (+34.25%)
Mutual labels:  bot, discord-bot, music, discord
Automod Bot
Fun moderation economy bot discord.js
Stars: ✭ 41 (-43.84%)
Mutual labels:  bot, discord-bot, music, discord
Master Bot
A Discord music bot with playlist support, music quiz, saved playlists, lyrics, gifs and more
Stars: ✭ 204 (+179.45%)
Mutual labels:  bot, discord-bot, music, discord
Scdlbot
Telegram Bot for downloading MP3 rips of tracks/sets from SoundCloud, Bandcamp, YouTube with tags and artwork.
Stars: ✭ 210 (+187.67%)
Mutual labels:  bot, soundcloud, music, youtube
Musicbot
🎶 A Discord music bot that's easy to set up and run yourself!
Stars: ✭ 1,109 (+1419.18%)
Mutual labels:  discord-bot, soundcloud, music, youtube
Clinet
Official repository for Clinet, a Discord bot intended for assistance and control within your guilds.
Stars: ✭ 28 (-61.64%)
Mutual labels:  bot, discord-bot, discord, youtube
Octave
Discord bot written in Java and Kotlin using JDA.
Stars: ✭ 156 (+113.7%)
Mutual labels:  bot, discord-bot, music, discord
Focabot
Music with seals!
Stars: ✭ 19 (-73.97%)
Mutual labels:  bot, discord-bot, music, discord
Pvpcraft
PvPCraft Discord bot
Stars: ✭ 29 (-60.27%)
Mutual labels:  bot, discord-bot, music, discord
Calebj Cogs
⚙ Cogs for Red-Discordbot
Stars: ✭ 42 (-42.47%)
Mutual labels:  bot, discord-bot, discord
Progress Bot
High-tech weaponized moe progress delivery bot for IRC, Discord, and web
Stars: ✭ 38 (-47.95%)
Mutual labels:  bot, discord-bot, discord
Juniperbot
Fluffy Discord Bot (Music, Ranking, Reminder, Vk Community bridge,WikiFur) created using JDA
Stars: ✭ 43 (-41.1%)
Mutual labels:  bot, discord-bot, discord
Create Discord Bot
Create Discord bots using a simple widget-based framework.
Stars: ✭ 70 (-4.11%)
Mutual labels:  bot, discord-bot, discord

npm Depfu Codacy Grade CodeFactor Grade

DisTube

A Discord.js v12 module to simplify your music commands and play songs with audio filters on Discord without any API key.

DisTube Support Server - Frequently Asked Questions

Features

  • Build on discord.js v12
  • Easily to use and customize
  • Support YouTube, SoundCloud, Facebook, and 700+ more sites
  • Audio filters (bassboost, nightcore, vaporwave,...)
  • Autoplay related YouTube songs
  • Prebuilt server queue
  • Multiple servers compatible

Installation

npm install distube

Requirement

Documentation

Read DisTube's definitions, properties and events details in the Documentation page.

Example Bot

  • DisTube-Bot - A music bot with reaction controller, filters, DJ mode, user's custom playlist and voting.
  • DisTube-Example - Example bot with simple command handler.
// DisTube example bot, definitions, properties and events details in the Documentation page.
const Discord = require('discord.js'),
    DisTube = require('distube'),
    client = new Discord.Client(),
    config = {
        prefix: ".",
        token: process.env.TOKEN || "Your Discord Token"
    };

// Create a new DisTube
const distube = new DisTube(client, { searchSongs: true, emitNewSongOnly: true });

client.on('ready', () => {
    console.log(`Logged in as ${client.user.tag}!`);
});

client.on("message", async (message) => {
    if (message.author.bot) return;
    if (!message.content.startsWith(config.prefix)) return;
    const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
    const command = args.shift();

    if (command == "play")
        distube.play(message, args.join(" "));

    if (["repeat", "loop"].includes(command))
        distube.setRepeatMode(message, parseInt(args[0]));

    if (command == "stop") {
        distube.stop(message);
        message.channel.send("Stopped the music!");
    }

    if (command == "skip")
        distube.skip(message);

    if (command == "queue") {
        let queue = distube.getQueue(message);
        message.channel.send('Current queue:\n' + queue.songs.map((song, id) =>
            `**${id + 1}**. ${song.name} - \`${song.formattedDuration}\``
        ).slice(0, 10).join("\n"));
    }

    if ([`3d`, `bassboost`, `echo`, `karaoke`, `nightcore`, `vaporwave`].includes(command)) {
        let filter = distube.setFilter(message, command);
        message.channel.send("Current queue filter: " + (filter || "Off"));
    }
});

// Queue status template
const status = (queue) => `Volume: \`${queue.volume}%\` | Filter: \`${queue.filter || "Off"}\` | Loop: \`${queue.repeatMode ? queue.repeatMode == 2 ? "All Queue" : "This Song" : "Off"}\` | Autoplay: \`${queue.autoplay ? "On" : "Off"}\``;

// DisTube event listeners, more in the documentation page
distube
    .on("playSong", (message, queue, song) => message.channel.send(
        `Playing \`${song.name}\` - \`${song.formattedDuration}\`\nRequested by: ${song.user}\n${status(queue)}`
    ))
    .on("addSong", (message, queue, song) => message.channel.send(
        `Added ${song.name} - \`${song.formattedDuration}\` to the queue by ${song.user}`
    ))
    .on("playList", (message, queue, playlist, song) => message.channel.send(
        `Play \`${playlist.name}\` playlist (${playlist.songs.length} songs).\nRequested by: ${song.user}\nNow playing \`${song.name}\` - \`${song.formattedDuration}\`\n${status(queue)}`
    ))
    .on("addList", (message, queue, playlist) => message.channel.send(
        `Added \`${playlist.name}\` playlist (${playlist.songs.length} songs) to queue\n${status(queue)}`
    ))
    // DisTubeOptions.searchSongs = true
    .on("searchResult", (message, result) => {
        let i = 0;
        message.channel.send(`**Choose an option from below**\n${result.map(song => `**${++i}**. ${song.name} - \`${song.formattedDuration}\``).join("\n")}\n*Enter anything else or wait 60 seconds to cancel*`);
    })
    // DisTubeOptions.searchSongs = true
    .on("searchCancel", (message) => message.channel.send(`Searching canceled`))
    .on("error", (message, e) => {
        console.error(e)
        message.channel.send("An error encountered: " + e);
    });

client.login(config.token);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].