3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Actually import the constants and not what VSC wants to import

This commit is contained in:
Dark 2021-08-16 01:23:54 +02:00
parent 9a5e911cf2
commit 9c1a40175a
No known key found for this signature in database
GPG key ID: 384C4B4F5B1E25A8

View file

@ -1,4 +1,4 @@
import { ApplicationCommandData } from "discord.js";
import { ApplicationCommandData, Constants } from "discord.js";
import { LogType } from "../../../data/LogType";
import { LogsPlugin } from "../../../plugins/Logs/LogsPlugin";
import { GuildPluginData } from "knub";
@ -14,7 +14,9 @@ export async function loadAllCommands(pluginData: GuildPluginData<ContextMenuPlu
for (const [name, label] of Object.entries(hardcodedContext)) {
if (!cfg[name]) continue;
const type = name.startsWith("user") ? 2 : 3; // 2 = User, 3 = Message (https://discord.com/developers/docs/interactions/application-commands#user-commands)
const type = name.startsWith("user")
? Constants.ApplicationCommandTypes.USER
: Constants.ApplicationCommandTypes.MESSAGE;
const data: ApplicationCommandData = {
type,
name: label,