Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Add double counter verification to command palette #49

Merged
merged 3 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/plugins/commandPalette/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ export default definePlugin({
registerAction({
id: "openDevSettings",
label: "Open Dev tab",
callback: () => SettingsRouter.open("VencordPatchHelper"),
registrar: "Vencord"
callback: () => SettingsRouter.open("SuncordPatchHelper"),
registrar: "Suncord"
});
}
},
Expand Down
24 changes: 24 additions & 0 deletions src/plugins/doubleCounterVerifyBypass/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import { SuncordDevs } from "@utils/constants";
import definePlugin from "@utils/types";
import { Alerts, Menu } from "@webpack/common";
import { Message } from "discord-types/general";
import { registerAction } from "plugins/commandPalette/commands";
import { openSimpleTextInput } from "plugins/commandPalette/components/TextInput";
import { Settings } from "Vencord";

const DOUBLECOUNTER_APP_ID = "703886990948565003";
const VERIFICATION_COMPONENT_ID = "verification_panel:verify";
Expand Down Expand Up @@ -69,6 +72,27 @@ export default definePlugin({

start() {
addContextMenuPatch("message", patchMessageContextMenu);

if (Settings.plugins.CommandPalette.enabled) {
registerAction({
id: "doubleCounterVerify",
label: "Verify a Double Counter Link",
callback: async () => {
const link = await openSimpleTextInput("Please enter the Double Counter link you want to verify.");
if (link) {
await verify(link).then(() => {
Alerts.show({
title: "Verified",
body: "You have been verified successfully, please wait a little bit for DoubleCounter to update your roles.",
confirmText: "Okay",
onConfirm: () => { }
});
});
}
},
registrar: "DoubleCounterVerifyBypass"
});
}
},

stop() {
Expand Down
Loading