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

youcord-notifications

v1.0.1

Published

get notifications for your channel directly to your discord channel automatically

Downloads

5

Readme

Installations

npm i youcord-notifications

What?

An module to easily recive Youtube uploads notification over Discord Channel.

Why?

  • Easy to use.
  • Active Support on discord server.
  • No API key needed (but API = fast response time).
  • psst~ low quota api route supported!

Note

  • At least Node JS 14 is required.
  • The feeds thing of youtube takes some time to update, so the notifications might be bit slow without api.

How ?

  • NOtifications

const youtube = require('youcord-notifications');

// The client is the Discord Client
const Notifier = new youtube.notifier(client, {
    // Default message
    message: "Hello @everyone, **{author}** just publish a cool video called **{title}**\nGo show your support\n\nurl : {url}",

    // Time interval to check for new uploads
    updateTime: 60000, // in milliseconds,

    // Give the mongo DB URI
    mongoURI: "mongo+srv://something",

    // Auto send the embed to the provided channel
    autoSend: true, // if false you will get A """Notifier.on("upload", () => {})""" event

    // The youtube data v3 API key, Send this if you want updates to be fast and precise because without the key it take 10-15 minutes more time to get latest videos
    apiKey: "the key",
});

let youtube_channel_id = "UCEQ7rUxYNgErtS09m7JbrQA";
let discord_channel_id = "1113560027433816267";
let notification_message = "{author} just posted a video ({title})\nLink: {url}\nThumbnail: {thumbnail}";
let ping = true;
let guild_id = "831121988608196618";

Notifier.addNotifier(youtube_channel_id, discord_channel_id, notification_message, ping, guild_id);
  • Listening to events

Notifier.on("upload", (client, data) => {
  // Do something with your data
});

// Example Data 
const data = {
    youtube: "UCEQ7rUxYNgErtS09m7JbrQA ", // The Youtube channel ID
    channel: channelID, // The discord channel ID
    lastVideo: last.link || "", // Latest video link
    message: "new upload", // Custom message
    author: "VenomExE", // The name of youtube channel
    title: "How to code", // title of the video
    link: "https://www.youtube.com/watch?v=52TGPlQimFc", // Link of the video
    thumbnail: "https://i9.ytimg.com/vi/52TGPlQimFc/mqdefault.jpg", // image url of the thumbnail
}
  • Utility functions (not currently working)

// To edit the notifier's channel ID, or the message, If you don't wanna change one of the property just give undefined in its place
Notifier.editNotifier(youtubeId, channelID, message);

// To remove a notifier
Notifier.removeNotifier(youtubeId)

Support

for support or issues or queries contace me on my discord server.