use proper constants for contexts and types

This commit is contained in:
bignutty 2024-12-08 15:12:19 +01:00
parent 6c1120a6ef
commit ad5c680f86
25 changed files with 121 additions and 143 deletions

View file

@ -7,7 +7,7 @@ const { acknowledge } = require('#utils/interactions');
const { editOrReply } = require('#utils/message')
const { STATICS } = require('#utils/statics')
const { ApplicationCommandOptionTypes } = require('detritus-client/lib/constants');
const { ApplicationCommandOptionTypes, InteractionContextTypes, ApplicationIntegrationTypes } = require('detritus-client/lib/constants');
// TODO: create a favicon() util
function createImageResultPage(context, result) {
@ -35,12 +35,12 @@ module.exports = {
aliases: ['i', 'img'],
description: 'Search the web for images on Google.',
contexts: [
0,
1,
2
InteractionContextTypes.GUILD,
InteractionContextTypes.PRIVATE_CHANNEL,
InteractionContextTypes.BOT_DM
],
integrationTypes: [
1
ApplicationIntegrationTypes.USER_INSTALL
],
options: [
{