Skip to content

Commit

Permalink
fix execute not working also imploment custom commands fr this time
Browse files Browse the repository at this point in the history
  • Loading branch information
byeoon committed Apr 19, 2024
1 parent 41a4176 commit 75fb82c
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 22 deletions.
18 changes: 9 additions & 9 deletions dist/vendetta.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { initBadges } from "@/lib/badge/badges";
import logger from "@lib/logger";
import windowObject from "@lib/windowObject";
import { initTweaks } from "./lib/tweak";
import { initCustomCommands } from "./lib/command";

export default async () => {
const unloads = await Promise.all([
Expand All @@ -23,6 +24,7 @@ export default async () => {
initSettings(),
initQuickInstall(),
initBadges(),
initCustomCommands(),
]);
window.vendetta = await windowObject(unloads);
unloads.push(await initPlugins());
Expand Down
11 changes: 4 additions & 7 deletions src/lib/commands/debug.tsx → src/lib/command/debug.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ import { getAssetIDByName } from "@/ui/assets";
export default [
{
name: 'balls',
description: 'this makes the balls ball'
}
description: 'this makes the balls ball',
execute: Messages.sendBotMessage("hi world!")
},
] as ApplicationCommand[]

execute: {
const msg = [];
msg.push("This is a test command");
Messages.sendBotMessage("hi world!");
}

4 changes: 3 additions & 1 deletion src/lib/commands/index.ts → src/lib/command/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ export function initCustomCommands(): void {
];

registerCommand(customCommands);
}
}

export default { initCustomCommands };
File renamed without changes.
File renamed without changes.
8 changes: 3 additions & 5 deletions src/lib/commands/reload.tsx → src/lib/command/reload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ import { BundleUpdaterManager } from "../native";

export default [
{
name: 'reload',
description: 'Restarts discord.'
name: 'reloadie',
description: 'Restarts discord.',
execute: BundleUpdaterManager.reload(),
}
] as ApplicationCommand[]

execute: {
BundleUpdaterManager.reload()
}
File renamed without changes.

0 comments on commit 75fb82c

Please sign in to comment.