Skip to content

Commit

Permalink
fix: bump djs and fix typings (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
imranbarbhuiya authored May 24, 2022
1 parent 63d6128 commit 210303f
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 53 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@typescript-eslint/eslint-plugin": "^5.26.0",
"@typescript-eslint/parser": "^5.26.0",
"cz-conventional-changelog": "^3.3.0",
"discord.js": "^13.6.0",
"discord.js": "^13.7.0",
"eslint": "^8.16.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
Expand Down
10 changes: 5 additions & 5 deletions src/lib/pagination/PaginationEmbed.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ButtonInteraction, EmbedField, InteractionReplyOptions, MessageAttachment, MessageEmbedOptions } from 'discord.js';
import type { ButtonInteraction, EmbedField, MessageAttachment, MessageEmbedOptions } from 'discord.js';
import { MessageActionRow, MessageButton, MessageEmbed } from 'discord.js';
import type { ButtonsOptions, ButtonStyle, EmojiOptions, LabelOptions, Options } from '../types';
import type { ButtonsOptions, ButtonStyle, EmojiOptions, LabelOptions, Options, Payload } from '../types';
import { defaultOptions } from './defaultOptions';

export type Embed = MessageEmbed | MessageEmbedOptions;
Expand Down Expand Up @@ -137,7 +137,7 @@ export abstract class PaginationEmbed extends MessageEmbed {
* @readonly
* @private
*/
private readonly payload: InteractionReplyOptions & { fetchReply: true };
private readonly payload: Payload;

/**
* Whether the footer is a custom footer or not.
Expand Down Expand Up @@ -824,7 +824,7 @@ export abstract class PaginationEmbed extends MessageEmbed {
* ```
*
*/
public ready(): InteractionReplyOptions & { fetchReply: true } {
public ready(): Payload {
if (this.fieldPaginate) {
this.rawFields = [];
this.rawFields.push(...this.fields);
Expand Down Expand Up @@ -978,7 +978,7 @@ export abstract class PaginationEmbed extends MessageEmbed {
* @returns
* @private
*/
private _readyPayloads(): InteractionReplyOptions & { fetchReply: true } {
private _readyPayloads(): Payload {
this._readyActionRows();
this.payload.components = this.actionRows;
this.payload.content = Array.isArray(this.contents) ? this.contents[0] ?? null : this.contents;
Expand Down
5 changes: 5 additions & 0 deletions src/lib/types/Payload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type { MessageOptions } from 'discord.js';

export interface Payload extends Pick<MessageOptions, 'content' | 'embeds' | 'files' | 'components'> {
fetchReply: true;
}
1 change: 1 addition & 0 deletions src/lib/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export * from './ButtonsOptions';
export * from './EmojiOptions';
export * from './LabelOptions';
export * from './Options';
export * from './Payload';
102 changes: 55 additions & 47 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -229,23 +229,24 @@ __metadata:
languageName: node
linkType: hard

"@discordjs/builders@npm:^0.11.0":
version: 0.11.0
resolution: "@discordjs/builders@npm:0.11.0"
"@discordjs/builders@npm:^0.13.0":
version: 0.13.0
resolution: "@discordjs/builders@npm:0.13.0"
dependencies:
"@sindresorhus/is": ^4.2.0
discord-api-types: ^0.26.0
ts-mixer: ^6.0.0
"@sapphire/shapeshift": ^2.0.0
"@sindresorhus/is": ^4.6.0
discord-api-types: ^0.31.1
fast-deep-equal: ^3.1.3
ts-mixer: ^6.0.1
tslib: ^2.3.1
zod: ^3.11.6
checksum: 7a25b59bb52d2e3695bca27946a99cf2de95b7edd5be424ea9f4707a465524be21263e25e532e12438e99f9f55fb98b033885c760aeb96424b8c12f663f50760
checksum: 1bce798b8f36b5abb09d8d42a660a5da6a9352ada03e0819d08ae6c98d4d8a556ed86485e252e53c448a40d17bf0d685e7f88f333db76f5b6b3bd562b9759d7c
languageName: node
linkType: hard

"@discordjs/collection@npm:^0.4.0":
version: 0.4.0
resolution: "@discordjs/collection@npm:0.4.0"
checksum: fa8fc4246921f3230eb6c5d6d4dc0caf9dd659fcc903175944edf4fb0a9ed9913fdf164733d3f1e644ef469bc79b0d38a526ee620b92169cb40e79b40b0c716b
"@discordjs/collection@npm:^0.6.0":
version: 0.6.0
resolution: "@discordjs/collection@npm:0.6.0"
checksum: a08826f04e3ddaf079913e2e2069727d518b5a0ea79cbeb66d8b559297df6586a25490b4b2aeab631483f68c2160df769115b9b3e114d8437b707dec80b02bab
languageName: node
linkType: hard

Expand Down Expand Up @@ -418,10 +419,10 @@ __metadata:
languageName: node
linkType: hard

"@sapphire/async-queue@npm:^1.1.9":
version: 1.3.0
resolution: "@sapphire/async-queue@npm:1.3.0"
checksum: 267a3970ac93aaffc9886582c39ca23a345e8d472042200635044d7e5c48f615d389623de5e6679c4fa335b554357faf872e1e32098b33e5d700099345d29559
"@sapphire/async-queue@npm:^1.3.1":
version: 1.3.1
resolution: "@sapphire/async-queue@npm:1.3.1"
checksum: 4016010a8b6f2896ce7694eb04c1839b613387cbfb104028a4a1bea471afb1dc4d569b66d3c9770319c47be55035dc786c072c32656d467fc2cded4347055d92
languageName: node
linkType: hard

Expand Down Expand Up @@ -465,6 +466,13 @@ __metadata:
languageName: node
linkType: hard

"@sapphire/shapeshift@npm:^2.0.0":
version: 2.2.0
resolution: "@sapphire/shapeshift@npm:2.2.0"
checksum: f6cdc706548b3c5acbcb24878bacfd5cc28629d72900bb53cf54911da3a42199a479c6875486824b17106360b7dc3c156f509ef9b04190fefa42d241ddec2696
languageName: node
linkType: hard

"@sapphire/utilities@npm:^3.0.1, @sapphire/utilities@npm:^3.6.2":
version: 3.6.2
resolution: "@sapphire/utilities@npm:3.6.2"
Expand All @@ -479,7 +487,7 @@ __metadata:
languageName: node
linkType: hard

"@sindresorhus/is@npm:^4.2.0":
"@sindresorhus/is@npm:^4.6.0":
version: 4.6.0
resolution: "@sindresorhus/is@npm:4.6.0"
checksum: 83839f13da2c29d55c97abc3bc2c55b250d33a0447554997a85c539e058e57b8da092da396e252b11ec24a0279a0bed1f537fa26302209327060643e327f81d2
Expand Down Expand Up @@ -549,7 +557,7 @@ __metadata:
languageName: node
linkType: hard

"@types/node-fetch@npm:^2.5.12":
"@types/node-fetch@npm:^2.6.1":
version: 2.6.1
resolution: "@types/node-fetch@npm:2.6.1"
dependencies:
Expand Down Expand Up @@ -587,7 +595,7 @@ __metadata:
languageName: node
linkType: hard

"@types/ws@npm:^8.2.2":
"@types/ws@npm:^8.5.3":
version: 8.5.3
resolution: "@types/ws@npm:8.5.3"
dependencies:
Expand Down Expand Up @@ -1651,27 +1659,34 @@ __metadata:
languageName: node
linkType: hard

"discord-api-types@npm:^0.26.0":
version: 0.26.1
resolution: "discord-api-types@npm:0.26.1"
checksum: e53bfa7589b24108e6b403dbe213da34c4592f72e2b8fde6800dcb6c703065887ecbd644e1cdf694e4c7796954bc51462ced868f26ec45dc1e0dc4fa8d3c723c
"discord-api-types@npm:^0.30.0":
version: 0.30.0
resolution: "discord-api-types@npm:0.30.0"
checksum: c4b0afbc453b7ce6b570501f83a654591432eb2ce690681d2e6a9424d5f9687b7ef02dde02702e53562449c5cdcde500e92299a8158eb9bf67ad85c073788e72
languageName: node
linkType: hard

"discord-api-types@npm:^0.31.1":
version: 0.31.2
resolution: "discord-api-types@npm:0.31.2"
checksum: 928d4f57f4c1ace0baf1d3b2c3ab4a4a5107f100217ce889a6e00ad365115fd328a0b922dbc62af6b6ccac9552ffd7ec3d07f4c8820502c5b55d9f2e5382dfba
languageName: node
linkType: hard

"discord.js@npm:^13.6.0":
version: 13.6.0
resolution: "discord.js@npm:13.6.0"
"discord.js@npm:^13.7.0":
version: 13.7.0
resolution: "discord.js@npm:13.7.0"
dependencies:
"@discordjs/builders": ^0.11.0
"@discordjs/collection": ^0.4.0
"@sapphire/async-queue": ^1.1.9
"@types/node-fetch": ^2.5.12
"@types/ws": ^8.2.2
discord-api-types: ^0.26.0
"@discordjs/builders": ^0.13.0
"@discordjs/collection": ^0.6.0
"@sapphire/async-queue": ^1.3.1
"@types/node-fetch": ^2.6.1
"@types/ws": ^8.5.3
discord-api-types: ^0.30.0
form-data: ^4.0.0
node-fetch: ^2.6.1
ws: ^8.4.0
checksum: 59c1297fbebf9b25c90ea125808bc9177c134fd7c481f82ace636ab88cfdc90bc6ec777c844d375d26231fc1664a67e80a1aad2aed484b808e4cd7d55cc1d9e3
ws: ^8.6.0
checksum: 2bab21c610401af57fae4ab5cf276a5201cfb321b306d9dc74c338b939ad051d3b5f47b465595f46ae41ed06cb1d4e0581fd7980852f91d3f18b4da5f70ef391
languageName: node
linkType: hard

Expand Down Expand Up @@ -3917,7 +3932,7 @@ __metadata:
"@typescript-eslint/eslint-plugin": ^5.26.0
"@typescript-eslint/parser": ^5.26.0
cz-conventional-changelog: ^3.3.0
discord.js: ^13.6.0
discord.js: ^13.7.0
eslint: ^8.16.0
eslint-config-prettier: ^8.5.0
eslint-plugin-prettier: ^4.0.0
Expand Down Expand Up @@ -4914,7 +4929,7 @@ __metadata:
languageName: node
linkType: hard

"ts-mixer@npm:^6.0.0":
"ts-mixer@npm:^6.0.1":
version: 6.0.1
resolution: "ts-mixer@npm:6.0.1"
checksum: 7050f6e85a24155d18cecdcc0a098d1038991cc498317fcffa9d7a8654c776d417fb97e65de1ce8e7ed54ef4814abd8057d0efb9c3b24e9cc78ac3c0f48bbf53
Expand Down Expand Up @@ -5326,9 +5341,9 @@ __metadata:
languageName: node
linkType: hard

"ws@npm:^8.4.0":
version: 8.5.0
resolution: "ws@npm:8.5.0"
"ws@npm:^8.6.0":
version: 8.6.0
resolution: "ws@npm:8.6.0"
peerDependencies:
bufferutil: ^4.0.1
utf-8-validate: ^5.0.2
Expand All @@ -5337,7 +5352,7 @@ __metadata:
optional: true
utf-8-validate:
optional: true
checksum: 76f2f90e40344bf18fd544194e7067812fb1372b2a37865678d8f12afe4b478ff2ebc0c7c0aff82cd5e6b66fc43d889eec0f1865c2365d8f7a66d92da7744a77
checksum: e2fca82059f1e087d0c78e2f37135e1b8332bc804fce46f83c2db1cb8571685abf9d2c99b964bab3752536ad90b99b46fb8d1428899aed3e560684ab4641bffd
languageName: node
linkType: hard

Expand Down Expand Up @@ -5404,10 +5419,3 @@ __metadata:
checksum: f77b3d8d00310def622123df93d4ee654fc6a0096182af8bd60679ddcdfb3474c56c6c7190817c84a2785648cdee9d721c0154eb45698c62176c322fb46fc700
languageName: node
linkType: hard

"zod@npm:^3.11.6":
version: 3.13.4
resolution: "zod@npm:3.13.4"
checksum: 3db8e4d27e8d305eed44c3eaff3e67fa26e39ad0bf4f06dbafae6b6e6516bdcc5aafe342afeb81ba0386fa53373404a18f0371d41a3738f1f9b85d1321ee9724
languageName: node
linkType: hard

0 comments on commit 210303f

Please sign in to comment.