Files
discordeno/plugins/validations/mod.ts
LTS20050703 17132aaf61 feat(helpers): add stickers helpers (#2466)
* 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
2022-09-22 11:31:41 -04:00

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;