npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

discordjs-ytdl

v2.2.0

Published

Great module for youtube video downloader for Discord Bots

Downloads

50

Readme

discordjs-ytdl

A Great NPM Module For Youtube Video DOwnloader with only keywords!!!

Purpose of Module

This module is a way to use ytdl-core but with this module you can search videos without inputting any url only with the keyword whatever you want! This module is for Discord Bots.

2.2.0 Update

- embed() function added.
- With this you don't have to install ffmpeg-static or opusscript extra from coding.
- If your API Key is invalid it will throw more understandable error.
- Make code prettier.
- Now play() function also return as a dispatcher.

2.0.0 Update

- thumbnail() function added.
- Updated version of ytdl-core

Rhino Inc. is a small company that was created by Arda Karagöz. Rhino Inc. contains Coding programs, Code Projects, Discord Bots etc. Rhino Inc. has small enviroment to know but its knowledge by others will be increase in next months.

Arda Karagöz is a 15 year old Half Developer. I am from Turkey and I want to be a software engineer. I know a lot about JavaScript and Python and also I know C#, C++, Java, HTML and CSS. I am the founder of Rhino Inc. I created lots of projects but the bests are: Rhino Bot(About 800K Users 900 Guilds - The Most Useful Turkish Bot), rhino-api(This Module. Helps you in math problems and daily fun codes), MasterG Bot(A Great Private Discord Bot For Our Server), Mental Power Discord Bot Tutorial(It will go more than +40 Eps), Github Markdown Repo(Will be published in few weeks.) and more...

What is This?

This is a module to make youtube downloader to mp3 files that can play on Discord Bots. This is a module for only bots but in future it will change. It's 3rd official module for Rhino Inc.

Topics

IF You Want To Learn About This Module's Tutorial Go To This Channel And watch "Discord Bot Dersleri #22"

Create Variable

For Creating Variable You Can Do This

const play = require('discordjs-ytdl')

A Simple Discord Bot

If You DON'T Know How to Make a Bot Click This

For Example You Can Make A Music Command Like This:

const Discord = require('discord.js') // discord.js modülü tanımlıyoruz.
const client = new Discord.Client() // client tanımalamsı

client.login('TOKEN')

client.on('message', async message => {
    // Voice only works in guilds, if the message does not come from a guild,
    // we ignore it
try {
    if (!message.guild) return;

    if (message.content.startsWith('/play')) {
        // Only try to join the sender's voice channel if they are in one themselves
        if (message.member.voice.channel) {
            const connection = await message.member.voice.channel.join();
            const args = message.content.split(' ').slice(1)
            const ytdl = require('ytdl-core')
            connection.play(ytdl(args.join(" ")))
        } else {
            message.reply('You need to join a voice channel first!');
        }
    }
} catch(e){
console.log(e)
}
});

But You Can Only Enter URL

Playing Music

So first please get an Youtube API Key on https://console.developers.google.com/

So code is like this :)

const connection = await message.member.voice.channel.join();
            const args = message.content.split(' ').slice(1)
            const play = require('discordjs-ytdl')
           await play.play(connection, args.join(" "), 'API KEY')

Getting Infos

You can get info about a video like this.

let title = await play.title(args.join(" "), 'API KEY')
message.channel.send('VIDEO NAME: ' + title)

All FUNCTIONS

  • .play(connection, keyword, api)
  • .title(keyword, api)
  • .channel(keyword, api)
  • .id(keyword, api)
  • .thumbnail(videoID)

Thumbnail

NEW!!!

You can get thumbnails of videos!

let play = require('discordjs-ytdl')
console.log(play.thumbnail('4w8Su0dRFAw'))

Embed

NEW!!!

You can get URL for Embed style of videos!

let play = require('discordjs-ytdl')
console.log(play.embed('4w8Su0dRFAw'))

Support

You Can Write Me For Wantings And Complains By

[email protected] - via E-Mail Rhino#5582 - via Discord Issues On Github https://github.com/ardakaragoz/discordjs-ytdl/

THANKS

Thanks for using my module in your PC. Have a nice day!

RHINO INC. INDUSTRY