You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to use popyt with my discord bot, this error shows up: (node:14684) UnhandledPromiseRejectionWarning: Items must either specify an ID or the 'mine' parameter. (node:14684) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:14684) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I don't know why is this happening, everything should be working.
The code is: const Discord = require("discord.js"); const { YouTube } = require('popyt'); const prefix = "~" const youtube = new YouTube('<token here>'); module.exports.run = async (bot, msg, args) => { const argums = msg.content.slice(prefix.length).split(' '); if (!argums.length) { return msg.channel.send(You didn't provide any arguments, ${msg.author}!); } else { const video = await youtube.getVideo(argums) msg.channel.send(video); } }
The text was updated successfully, but these errors were encountered:
When I try to use popyt with my discord bot, this error shows up:
(node:14684) UnhandledPromiseRejectionWarning: Items must either specify an ID or the 'mine' parameter. (node:14684) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:14684) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I don't know why is this happening, everything should be working.
The code is:
const Discord = require("discord.js"); const { YouTube } = require('popyt'); const prefix = "~" const youtube = new YouTube('<token here>'); module.exports.run = async (bot, msg, args) => { const argums = msg.content.slice(prefix.length).split(' '); if (!argums.length) { return msg.channel.send(
You didn't provide any arguments, ${msg.author}!); } else { const video = await youtube.getVideo(argums) msg.channel.send(video); } }
The text was updated successfully, but these errors were encountered: