mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Update DJS
This commit is contained in:
parent
ac619ec00f
commit
5e73d380c5
23 changed files with 71 additions and 56 deletions
|
@ -1,9 +1,18 @@
|
|||
import { Client, Message, MessageOptions, MessageReaction, PartialUser, TextChannel, User } from "discord.js";
|
||||
import {
|
||||
Client,
|
||||
Message,
|
||||
MessageEditOptions,
|
||||
MessageOptions,
|
||||
MessageReaction,
|
||||
PartialUser,
|
||||
TextChannel,
|
||||
User,
|
||||
} from "discord.js";
|
||||
import { Awaitable } from "knub/dist/utils";
|
||||
import { MINUTES, noop } from "../utils";
|
||||
import Timeout = NodeJS.Timeout;
|
||||
|
||||
export type LoadPageFn = (page: number) => Awaitable<MessageOptions>;
|
||||
export type LoadPageFn = (page: number) => Awaitable<MessageOptions & MessageEditOptions>;
|
||||
|
||||
export interface PaginateMessageOpts {
|
||||
timeout: number;
|
||||
|
|
|
@ -23,7 +23,7 @@ export async function waitForButtonConfirm(
|
|||
const message = await channel.send({ ...toPost, components: [row] });
|
||||
|
||||
const filter = (iac: MessageComponentInteraction) => iac.message.id === message.id;
|
||||
const collector = message.createMessageComponentInteractionCollector({ filter, time: 10000 });
|
||||
const collector = message.createMessageComponentCollector({ filter, time: 10000 });
|
||||
|
||||
collector.on("collect", (interaction: MessageComponentInteraction) => {
|
||||
if (options?.restrictToId && options.restrictToId !== interaction.user.id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue