3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-11 04:45:02 +00:00

Various Knub 30 and type fixes

This commit is contained in:
Dragory 2020-07-06 02:08:11 +03:00
parent eb703face3
commit 177fc40780
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
4 changed files with 20 additions and 16 deletions

View file

@ -9,7 +9,6 @@ import {
GuildAuditLog,
GuildAuditLogEntry,
GuildChannel,
Invite,
Member,
Message,
MessageContent,
@ -28,7 +27,7 @@ const fsp = fs.promises;
import https from "https";
import tmp from "tmp";
import { logger, waitForReaction } from "knub";
import { logger, helpers } from "knub";
import { SavedMessage } from "./data/entities/SavedMessage";
import { decodeAndValidateStrict, StrictValidationError } from "./validatorUtils";
import { either } from "fp-ts/lib/Either";
@ -1072,7 +1071,7 @@ export async function resolveInvite(code: string): Promise<ChannelInvite | null>
export async function confirm(bot: Client, channel: TextableChannel, userId: string, content: MessageContent) {
const msg = await channel.createMessage(content);
const reply = await waitForReaction(bot, msg, ["✅", "❌"], userId);
const reply = await helpers.waitForReaction(bot, msg, ["✅", "❌"], userId);
msg.delete().catch(noop);
return reply && reply.name === "✅";
}