This commit is contained in:
parent
34964af78e
commit
1106585f58
2 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
export type ButtonInteraction = {
|
export type ButtonInteraction = {
|
||||||
guild: {} | null,
|
guild: object | null,
|
||||||
guildId: string | null,
|
guildId: string | null,
|
||||||
channel: {
|
channel: {
|
||||||
isSendable: jest.Func,
|
isSendable: jest.Func,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { ButtonInteraction, EmbedBuilder, InteractionResponse } from "discord.js";
|
import { ButtonInteraction, InteractionResponse, InteractionUpdateOptions, MessagePayload } from "discord.js";
|
||||||
import Use from "../../../src/buttonEvents/Effects/Use";
|
import Use from "../../../src/buttonEvents/Effects/Use";
|
||||||
import { mock } from "jest-mock-extended";
|
import { mock } from "jest-mock-extended";
|
||||||
import AppLogger from "../../../src/client/appLogger";
|
import AppLogger from "../../../src/client/appLogger";
|
||||||
|
@ -82,7 +82,7 @@ describe("UseConfirm", () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
interaction.customId += " unclaimed";
|
interaction.customId += " unclaimed";
|
||||||
interaction.user.id = "userId";
|
interaction.user.id = "userId";
|
||||||
interaction.update.mockImplementation(async (opts: any) => {
|
interaction.update.mockImplementation(async (opts: string | MessagePayload | InteractionUpdateOptions) => {
|
||||||
updatedWith = opts;
|
updatedWith = opts;
|
||||||
|
|
||||||
return mock<InteractionResponse<boolean>>();
|
return mock<InteractionResponse<boolean>>();
|
||||||
|
@ -133,7 +133,7 @@ describe("UseCancel", () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
interaction.customId += " unclaimed";
|
interaction.customId += " unclaimed";
|
||||||
interaction.user.id = "userId";
|
interaction.user.id = "userId";
|
||||||
interaction.update.mockImplementation(async (opts: any) => {
|
interaction.update.mockImplementation(async (opts: string | MessagePayload | InteractionUpdateOptions) => {
|
||||||
updatedWith = opts;
|
updatedWith = opts;
|
||||||
|
|
||||||
return mock<InteractionResponse<boolean>>();
|
return mock<InteractionResponse<boolean>>();
|
||||||
|
|
Loading…
Reference in a new issue