mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
change: prettier code
This commit is contained in:
committed by
GitHub Action
parent
5051c44e0d
commit
573acf1dc1
@@ -2,17 +2,17 @@ import { Bot } from "../../../src/bot.ts";
|
||||
import { assertEquals } from "../../deps.ts";
|
||||
|
||||
export async function pinMessageTests(bot: Bot, channelId: bigint, messageId: bigint, t: Deno.TestContext) {
|
||||
let pinned = false;
|
||||
|
||||
bot.events.channelPinsUpdate = function (bot, payload) {
|
||||
if (payload.channelId === channelId) pinned = !pinned;
|
||||
}
|
||||
let pinned = false;
|
||||
|
||||
await bot.helpers.pinMessage(channelId, messageId);
|
||||
bot.events.channelPinsUpdate = function (bot, payload) {
|
||||
if (payload.channelId === channelId) pinned = !pinned;
|
||||
};
|
||||
|
||||
assertEquals(true, pinned);
|
||||
await bot.helpers.pinMessage(channelId, messageId);
|
||||
|
||||
await bot.helpers.unpinMessage(channelId, messageId);
|
||||
assertEquals(true, pinned);
|
||||
|
||||
assertEquals(false, pinned);
|
||||
}
|
||||
await bot.helpers.unpinMessage(channelId, messageId);
|
||||
|
||||
assertEquals(false, pinned);
|
||||
}
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ Deno.test("[Bot] - Starting Tests", async (t) => {
|
||||
// ALL MESSAGE RELATED TESTS THAT DEPEND ON AN EXISTING CHANNEL
|
||||
await t.step("Message related tests", async (t) => {
|
||||
const message = await bot.helpers.sendMessage(channel.id, "Hello Skillz");
|
||||
|
||||
|
||||
// CONDUCT ALL TESTS RELATED TO A MESSAGE HERE
|
||||
await Promise.all([
|
||||
t.step({
|
||||
|
||||
Reference in New Issue
Block a user