mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-30 07:20:08 +00:00
* helpers: add stickers helpers * deno fmt * undo move getNitroStickerPack to stickers * helpers/stickers: fix jsdocs * plugins/permissions: check stickers permissions * plugins/validations: validate stickers stuff * tests: stickers unit tests * helpers/stickers: add support for reason * plugins/permissions: MANAGE_EMOJIS -> MANAGE_EMOJIS_AND_STICKERS * tests/stickers: delete sticker after test createGuildSticker: add send sticker test getGuildStickers: create another sticker then test > 1 stickers
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import { Bot } from "./deps.ts";
|
|
import { channels } from "./src/channels/mod.ts";
|
|
import { guilds } from "./src/guilds/mod.ts";
|
|
import { interactions } from "./src/interaction/mod.ts";
|
|
import { invites } from "./src/invites/mod.ts";
|
|
import { members } from "./src/members/mod.ts";
|
|
import { messages } from "./src/messages/mod.ts";
|
|
import { misc } from "./src/misc/mod.ts";
|
|
import { stickers } from "./src/stickers/mod.ts";
|
|
import { webhooks } from "./src/webhooks/mod.ts";
|
|
|
|
// PLUGINS MUST TAKE A BOT ARGUMENT WHICH WILL BE MODIFIED
|
|
export function enableValidationsPlugin<B extends Bot>(bot: B): B {
|
|
// MARK THIS PLUGIN BEING USED
|
|
bot.enabledPlugins.add("VALIDATIONS");
|
|
|
|
// BEGIN OVERRIDING HELPER FUNCTIONS
|
|
channels(bot);
|
|
guilds(bot);
|
|
interactions(bot);
|
|
invites(bot);
|
|
members(bot);
|
|
messages(bot);
|
|
misc(bot);
|
|
stickers(bot);
|
|
webhooks(bot);
|
|
|
|
// PLUGINS MUST RETURN THE BOT
|
|
return bot;
|
|
}
|
|
|
|
// EXPORT ALL UTIL FUNCTIONS
|
|
export * from "./src/applicationCommandOptions.ts";
|
|
export * from "./src/attachments.ts";
|
|
export * from "./src/components.ts";
|
|
|
|
// DEFAULT MAKES IT SLIGHTLY EASIER TO USE
|
|
export default enableValidationsPlugin;
|