mirror of
https://github.com/Vendicated/Vencord.git
synced 2024-09-20 06:30:35 +00:00
added second command, also added to devs for simplicity not sure if i should YET tho
This commit is contained in:
parent
ccce4952cc
commit
bde85e073a
2 changed files with 29 additions and 4 deletions
|
@ -6,11 +6,12 @@
|
||||||
|
|
||||||
import definePlugin from "@utils/types";
|
import definePlugin from "@utils/types";
|
||||||
import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption, sendBotMessage, RequiredMessageOption } from "@api/Commands";
|
import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption, sendBotMessage, RequiredMessageOption } from "@api/Commands";
|
||||||
|
import Devs from "utils/constants";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "WebhookManager",
|
name: "WebhookManager",
|
||||||
description: "Manage your webhooks easily; delete, send messages, get detailed info and more.",
|
description: "Manage your webhooks easily; delete, send messages, get detailed info and more.",
|
||||||
authors: [{ id: 1, name: "byron", },], // will change ID soon, not home
|
authors: [Devs.byron],
|
||||||
dependencies: ["CommandsAPI"],
|
dependencies: ["CommandsAPI"],
|
||||||
commands: [
|
commands: [
|
||||||
{
|
{
|
||||||
|
@ -19,12 +20,11 @@ export default definePlugin({
|
||||||
inputType: ApplicationCommandInputType.BUILT_IN,
|
inputType: ApplicationCommandInputType.BUILT_IN,
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
RequiredMessageOption, // will this work? will debug when home.
|
RequiredMessageOption, // will debug when home.
|
||||||
name: "url",
|
name: "url",
|
||||||
description: "The URL of the webhook.",
|
description: "The URL of the webhook.",
|
||||||
|
|
||||||
|
|
||||||
type: ApplicationCommandOptionType.STRING,
|
type: ApplicationCommandOptionType.STRING,
|
||||||
|
|
||||||
execute: (opts, ctx) => {
|
execute: (opts, ctx) => {
|
||||||
|
|
||||||
sendBotMessage(ctx.channel.id, {
|
sendBotMessage(ctx.channel.id, {
|
||||||
|
@ -35,5 +35,26 @@ export default definePlugin({
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
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."
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
|
@ -426,6 +426,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({
|
||||||
Elvyra: {
|
Elvyra: {
|
||||||
name: "Elvyra",
|
name: "Elvyra",
|
||||||
id: 708275751816003615n,
|
id: 708275751816003615n,
|
||||||
|
},
|
||||||
|
Byron: {
|
||||||
|
name: "byron", // am i even allowed to add this right now?
|
||||||
|
id: 639577344276692992n,
|
||||||
}
|
}
|
||||||
} satisfies Record<string, Dev>);
|
} satisfies Record<string, Dev>);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue