check-quota: define integration types and context to any

This commit is contained in:
Wroclaw 2024-04-23 21:11:40 +02:00
parent 3c10f4ed6f
commit d9bee2dcf2

View file

@ -1,6 +1,10 @@
import { ApplicationCommandType, ChatInputCommandInteraction, APIApplicationCommandOption, ApplicationCommandOptionType, APIEmbedField } from "discord.js";
import Command from "../command";
import
Command
,{ApplicationIntegrationType
, InteractionContextTypes
} from "../command";
import { config } from "../index";
export default class MyLimit extends Command implements Command {
@ -21,6 +25,15 @@ export default class MyLimit extends Command implements Command {
required: false,
}
];
integration_types = [
ApplicationIntegrationType.Guild_Install,
ApplicationIntegrationType.User_Install
];
contexts = [
InteractionContextTypes.Guild,
InteractionContextTypes.BotDM,
InteractionContextTypes.PrivateChannel
];
async execute(interaction: ChatInputCommandInteraction) {
let recoveryFor = interaction.options.getInteger("recovery-for", false);