diff --git a/.gitignore b/.gitignore index 135673a6d..9eacd797b 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,7 @@ lerna-debug.log* .pnpm-debug.log* *.tsbuildinfo -src/userplugins +src/userplugins/globalBadges.tsx ExtensionCache/ settings/ diff --git a/src/userplugins/WebhookManager.tsx b/src/userplugins/WebhookManager.tsx new file mode 100644 index 000000000..cc7f21d1c --- /dev/null +++ b/src/userplugins/WebhookManager.tsx @@ -0,0 +1,49 @@ +import definePlugin from "@utils/types"; +import { ApplicationCommandInputType, ApplicationCommandOptionType, sendBotMessage } from "@api/Commands"; +import { Devs } from "@utils/constants"; + +export default definePlugin({ + name: "WebhookManager", + description: "Manage your webhooks easily; delete, send messages, get detailed info and more.", + authors: [Devs.Byron], + dependencies: ["CommandsAPI"], + + commands: [ + { + name: "deletewebhook", + description: "Delete a webhook.", + inputType: ApplicationCommandInputType.BUILT_IN, + options: [ + { + name: "url", + description: "The URL of the webhook.", + type: ApplicationCommandOptionType.STRING + } + ], + execute: async (_, ctx) => { + sendBotMessage(ctx.channel.id, { + content: "Hello world! \n " + + "This is a string addition and \n, testing." + }); + } + }, + { + name: "webhookinfo", + description: "Retrieve information about a webhook.", + inputType: ApplicationCommandInputType.BUILT_IN, + options: [ + { + name: "url", + description: "The URL of the webhook.", + type: ApplicationCommandOptionType.STRING + } + ], + execute: async (_, ctx) => { + sendBotMessage(ctx.channel.id, { + content: "Hello world! \n " + + "This is a string addition and \n, testing." + }); + } + } + ] +}); \ No newline at end of file diff --git a/src/userplugins/WebhookManager/index.ts b/src/userplugins/WebhookManager/index.ts deleted file mode 100644 index 0b9e611c5..000000000 --- a/src/userplugins/WebhookManager/index.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - - vencord is cool - -*/ - -import definePlugin from "@utils/types"; -import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption, sendBotMessage, RequiredMessageOption } from "@api/Commands"; -import Devs from "utils/constants"; - -export default definePlugin({ - name: "WebhookManager", - description: "Manage your webhooks easily; delete, send messages, get detailed info and more.", - authors: [Devs.byron], - dependencies: ["CommandsAPI"], - commands: [ - { - name: "deletewebhook", - description: "Delete a webhook.", - inputType: ApplicationCommandInputType.BUILT_IN, - options: [ - { - RequiredMessageOption, // will debug when home. - name: "url", - description: "The URL of the webhook.", - type: ApplicationCommandOptionType.STRING, - - execute: (opts, ctx) => { - - sendBotMessage(ctx.channel.id, { - content: "Hello world! \n " + - "This is a string addition and \n, testing." - }); - } - } - ], - }, - { - name: "webhookinfo", - description: "Retrieve information about a webhook.", - inputType: ApplicationCommandInputType.BUILT_IN, - options: [ - { - RequiredMessageOption, - name: "url", - description: "The URL of the webhook.", - type: ApplicationCommandOptionType.STRING, - - execute: (opts, ctx) => { - - sendBotMessage(ctx.channel.id, { - content: "Hello world! \n " + - "This is a string addition and \n, testing." - }); - } - } - ], - } - ] -}); \ No newline at end of file