Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aeroware/discord-utils

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aeroware/discord-utils - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

27

dist/pagination/index.js

@@ -54,4 +54,3 @@ "use strict";

if (options.startingPage) {
if (typeof options.startingPage !== "number" ||
!Number.isInteger(options.startingPage))
if (typeof options.startingPage !== "number" || !Number.isInteger(options.startingPage))
throw new Error("Starting page index must be an integer.");

@@ -64,4 +63,2 @@ if (options.startingPage < 0)

if (options.time) {
if (typeof options.startingPage !== "number")
throw new Error("Starting page index must be a non-negative number.");
if (options.time < 0)

@@ -80,9 +77,7 @@ throw new Error("Time must be non-negative.");

if (options.fastForwardAndRewind.fastForwardPrompt) {
if (typeof options.fastForwardAndRewind.fastForwardPrompt !== "string" ||
!options.fastForwardAndRewind.fastForwardPrompt.length)
if (typeof options.fastForwardAndRewind.fastForwardPrompt !== "string" || !options.fastForwardAndRewind.fastForwardPrompt.length)
throw new Error("Prompt should be a string that is not empty.");
}
if (options.fastForwardAndRewind.rewindPrompt) {
if (typeof options.fastForwardAndRewind.rewindPrompt !== "string" ||
!options.fastForwardAndRewind.rewindPrompt.length)
if (typeof options.fastForwardAndRewind.rewindPrompt !== "string" || !options.fastForwardAndRewind.rewindPrompt.length)
throw new Error("Prompt should be a string that is not empty.");

@@ -93,4 +88,3 @@ }

if (options.goTo.prompt) {
if (typeof options.goTo.prompt !== "string" ||
!options.goTo.prompt.length)
if (typeof options.goTo.prompt !== "string" || !options.goTo.prompt.length)
throw new Error("Prompt should be a string that is not empty.");

@@ -107,4 +101,3 @@ if (typeof options.goTo.time !== "number" || options.goTo.time < 0)

pagination = _a.sent();
emojis = (options === null || options === void 0 ? void 0 : options.fastForwardAndRewind) ? ["⏪", "◀️", "⏹", "▶️", "⏩"]
: ["◀️", "⏹", "▶️"];
emojis = (options === null || options === void 0 ? void 0 : options.fastForwardAndRewind) ? ["⏪", "◀️", "⏹", "▶️", "⏩"] : ["◀️", "⏹", "▶️"];
if (options === null || options === void 0 ? void 0 : options.goTo)

@@ -117,5 +110,3 @@ emojis.push("🔢");

pagination.react(emojis[(options === null || options === void 0 ? void 0 : options.fastForwardAndRewind) ? 2 : 1]);
collector = pagination.createReactionCollector(function (reaction, user) {
return emojis.includes(reaction.emoji.name) && user.id === message.author.id;
}, {
collector = pagination.createReactionCollector(function (reaction, user) { return emojis.includes(reaction.emoji.name) && user.id === message.author.id; }, {
dispose: true,

@@ -145,4 +136,3 @@ time: (options === null || options === void 0 ? void 0 : options.time) || 60000,

return [2 /*return*/];
return [4 /*yield*/, message.channel.send(options.fastForwardAndRewind.rewindPrompt ||
"How many pages would you like to go back?")];
return [4 /*yield*/, message.channel.send(options.fastForwardAndRewind.rewindPrompt || "How many pages would you like to go back?")];
case 2:

@@ -189,4 +179,3 @@ rwp = _h.sent();

return [2 /*return*/];
return [4 /*yield*/, message.channel.send(options.fastForwardAndRewind.fastForwardPrompt ||
"How many pages would you like to go forward?")];
return [4 /*yield*/, message.channel.send(options.fastForwardAndRewind.fastForwardPrompt || "How many pages would you like to go forward?")];
case 11:

@@ -193,0 +182,0 @@ ffp = _h.sent();

{
"name": "@aeroware/discord-utils",
"version": "1.0.4",
"version": "1.0.5",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc