Fixed bugs with plugin, on pc now & i use other plugins so i put it in gitignore

This commit is contained in:
byron 2024-03-11 16:15:58 -04:00
parent bde85e073a
commit ff6f24b8c9
3 changed files with 50 additions and 61 deletions

2
.gitignore vendored
View file

@ -18,7 +18,7 @@ lerna-debug.log*
.pnpm-debug.log* .pnpm-debug.log*
*.tsbuildinfo *.tsbuildinfo
src/userplugins src/userplugins/globalBadges.tsx
ExtensionCache/ ExtensionCache/
settings/ settings/

View file

@ -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."
});
}
}
]
});

View file

@ -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."
});
}
}
],
}
]
});