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;
|
||||
let pinned = false;
|
||||
|
||||
bot.events.channelPinsUpdate = function (bot, payload) {
|
||||
if (payload.channelId === channelId) pinned = !pinned;
|
||||
}
|
||||
bot.events.channelPinsUpdate = function (bot, payload) {
|
||||
if (payload.channelId === channelId) pinned = !pinned;
|
||||
};
|
||||
|
||||
await bot.helpers.pinMessage(channelId, messageId);
|
||||
await bot.helpers.pinMessage(channelId, messageId);
|
||||
|
||||
assertEquals(true, pinned);
|
||||
assertEquals(true, pinned);
|
||||
|
||||
await bot.helpers.unpinMessage(channelId, messageId);
|
||||
await bot.helpers.unpinMessage(channelId, messageId);
|
||||
|
||||
assertEquals(false, pinned);
|
||||
assertEquals(false, pinned);
|
||||
}
|
||||
Reference in New Issue
Block a user