New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@sapphire/discord.js-utilities

Package Overview
Dependencies
Maintainers
3
Versions
1082
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sapphire/discord.js-utilities - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1-pr-137.cd584a47.0

13

dist/index.js

@@ -1058,6 +1058,7 @@ 'use strict';

* Generally this will be the command message, but it can also be another message from your bot, i.e. to indicate a loading state.
* @param target The user who will be able to interact with the reactions of this {@link PaginatedMessage}. Defaults to `message.author`.
*/
async run(message) {
async run(message, target = message.author) {
// Try to get the previous PaginatedMessage for this user
const paginatedMessage = PaginatedMessage.handlers.get(message.author.id);
const paginatedMessage = PaginatedMessage.handlers.get(target.id);
// If a PaginatedMessage was found then stop it

@@ -1075,4 +1076,4 @@ if (paginatedMessage)

throw new Error('There are no messages.');
await this.setUpMessage(message.channel, message.author);
await this.setUpReactions(message.channel, message.author);
await this.setUpMessage(message.channel, target);
await this.setUpReactions(message.channel, target);
const messageId = this.response.id;

@@ -1082,6 +1083,6 @@ if (this.collector) {

PaginatedMessage.messages.delete(messageId);
PaginatedMessage.handlers.delete(message.author.id);
PaginatedMessage.handlers.delete(target.id);
});
PaginatedMessage.messages.set(messageId, this);
PaginatedMessage.handlers.set(message.author.id, this);
PaginatedMessage.handlers.set(target.id, this);
}

@@ -1088,0 +1089,0 @@ return this;

@@ -261,4 +261,5 @@ import { Awaited } from '@sapphire/utilities';

* Generally this will be the command message, but it can also be another message from your bot, i.e. to indicate a loading state.
* @param target The user who will be able to interact with the reactions of this {@link PaginatedMessage}. Defaults to `message.author`.
*/
run(message: Message): Promise<this>;
run(message: Message, target?: User): Promise<this>;
/**

@@ -265,0 +266,0 @@ * Executed whenever {@link PaginatedMessage.run} is called.

{
"name": "@sapphire/discord.js-utilities",
"version": "2.0.0",
"version": "2.0.1-pr-137.cd584a47.0",
"description": "Discord.js specific utilities for your JavaScript/TypeScript bots",

@@ -57,3 +57,3 @@ "author": "@sapphire",

},
"gitHead": "e073f47a0b8291412d9f4575af2d69242d494d0a"
"gitHead": "cd584a47b6e6b528770769c4573880adfe16beab"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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