Youtube Notifier Added!!! Project Applîcation Only!!!
js
const http = require("http");
const express = require("express");
const app = express();
var server = http.createServer(app);app.get("/", (request, response) => {
console.log(
Ping Received.);
response.writeHead(200, { "Content-Type": "text/plain" });
response.end("DISCORD BOT YO");
});const listener = server.listen(process.env.PORT, function() {
console.log(
Your app is listening on port + listener.address().port);
});
const discord = require("discord.js")
const client = new discord.Client()
const { TOKEN, CHANNEL_ID, SERVER_CHANNEL_ID } = require("./config.json");
const ApplicationClient = require('application.js');
client.on("ready", () => {
console.log("Watching " + CHANNEL_ID.length + " Channels")
})
const applidation = new ApplicationClient({
hubCallback: 'https://necessary-probable-slouch.glitch.me/yt',
secret: 'JOIN_MY_SERVER_OR_DIE'
});
application.on('notified', data => {
console.log('New Video');
client.channels.cache.get(SERVER_CHANNEL_ID).send(
${data.channel.name} just uploaded a new video - ${data.video.link}
);
});
application.subscribe(CHANNEL_ID);app.use("/yt", application.listener());
client.login(TOKEN)
`config.json EXAMPLE
`js
{
"TOKEN": "",
"CHANNEL_ID": ["UC8PayvChcsfei4dG5MhaexA"],
"SERVER_CHANNEL_ID": "735118044145123348"
}
`Project Applîcation
Hello, We Are Project Application Developers. We Make This NPM Package to make your code easier! You can See A List Of Commands Below, also you can see how to install our package in a video!
List Of Random Commands
- GET RANDOM ADVICE
- GET RANDOM NEKO IMAGE
- GET RANDOM ANIME IMAGE(BASED ON ACTION)
- GET RANDOM MEME
- GET RANDOM JOKES
- GET RANDOM STING(BASED ON GIVEN NUMBER)
- GET RANDOM KPOP SINGER
SETUP
`js
const discord = require("discord.js")
const client = new discord.Client()
const { Application } = require("application.js")
const application = new Application();
client.on("ready", () => {
console.log("Ready to go")
})
client.on("message", async message => {
if(message.content === "!meme") {
let data = await application.getMeme()
message.channel.send(data)
}
})
client.login("TOKEN")
`USE OF RANDOM COMMANDS
getMeme(): Provieds You the JSON embed with meme image and title.
`js
let data = await application.getMeme()
message.channel.send(data)
`getAdvice(): Provieds You a random advice.
`js
let data = await application.getAdvice()
message.channel.send(data)
`getString(number): Provieds You a random string, length will be based on the number you gave.
`js
let data = await application.getString(6)
message.channel.send(data)
`getNeko(): Provieds You a random neko image.
`js
let data = await application.getNeko()
message.channel.send(data)
`getJoke(): Provieds You a Random Funny Joke.
`js
let data = await application.getJoke()
message.channel.send(data)
`getAnimeImgURL(type): Provied you a random image url of anime(based on action), availabe actions are "pat", "hug", "waifu", "cry", "kiss", "slap", "smug", "punch"
`js
let data = await application.getAnimeImgURL("cry")
message.channel.send(data)
`getKpop(): Provide you a Random Kpop singer image and name.
`js
let data = await application.getKpop()
message.channel.send(data)
``Project Applîcation Server => SOON