From 2440dc7872df6fcbe62f27e17efd3d76ad1754c1 Mon Sep 17 00:00:00 2001 From: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com> Date: Mon, 29 Nov 2021 14:19:56 +0000 Subject: [PATCH] idk add logs it wont work --- tests/misc/editBotStatus.ts | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/misc/editBotStatus.ts b/tests/misc/editBotStatus.ts index 1b7236951..c066fc033 100644 --- a/tests/misc/editBotStatus.ts +++ b/tests/misc/editBotStatus.ts @@ -1,12 +1,24 @@ import { assertExists } from "../deps.ts"; import { bot } from "../mod.ts"; import { ActivityTypes } from "../../src/types/activity/activityTypes.ts"; -Deno.test("editBotStatus", function () { +import { delayUntil } from "../utils.ts"; + +Deno.test("[misc] edit the bot's status", async function () { + bot.events.presenceUpdate = function (_bot, presense, _oldPresense) { + console.log('in pu') + console.log('in pu') + assertExists(presense); + }; + + bot.events.botUpdate = function (bot, user) { + console.log('in bu') + console.log('in bu') + } + bot.helpers.editBotStatus({ status: "dnd", activities: [{ name: "lts20050703", type: ActivityTypes.Game, createdAt: Date.now() }], }); - bot.events.presenceUpdate = function (_bot, presense, _oldPresense) { - assertExists(presense); - }; + + await delayUntil(10000, () => false) });