mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 22:23:03 -04:00
use proper constants for contexts and types
This commit is contained in:
parent
6c1120a6ef
commit
ad5c680f86
25 changed files with 121 additions and 143 deletions
|
@ -4,7 +4,7 @@ const { createEmbed } = require('#utils/embed');
|
|||
const { acknowledge } = require('#utils/interactions');
|
||||
const { editOrReply } = require('#utils/message');
|
||||
|
||||
const { ApplicationCommandTypes } = require("detritus-client/lib/constants");;
|
||||
const { ApplicationCommandTypes, InteractionContextTypes, ApplicationIntegrationTypes } = require("detritus-client/lib/constants");;
|
||||
|
||||
const superagent = require('superagent')
|
||||
|
||||
|
@ -14,12 +14,12 @@ module.exports = {
|
|||
name: 'Music Platforms',
|
||||
type: ApplicationCommandTypes.MESSAGE,
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
run: async (context, args) => {
|
||||
try{
|
||||
|
|
|
@ -6,21 +6,21 @@ const { createEmbed } = require('#utils/embed');
|
|||
const { acknowledge } = require('#utils/interactions');
|
||||
const { codeblock, pill, icon } = require('#utils/markdown');
|
||||
const { editOrReply } = require('#utils/message');
|
||||
const { STATICS, STATIC_ICONS, STATIC_ACTIONS } = require('#utils/statics');
|
||||
const { STATICS, STATIC_ACTIONS } = require('#utils/statics');
|
||||
|
||||
const { ApplicationCommandTypes, MessageFlags } = require("detritus-client/lib/constants");
|
||||
const { ApplicationCommandTypes, MessageFlags, InteractionContextTypes, ApplicationIntegrationTypes } = require("detritus-client/lib/constants");
|
||||
const { Components } = require('detritus-client/lib/utils');
|
||||
|
||||
module.exports = {
|
||||
name: 'OCR',
|
||||
type: ApplicationCommandTypes.MESSAGE,
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
run: async (context, args) => {
|
||||
try{
|
||||
|
|
|
@ -8,7 +8,7 @@ const { acknowledge } = require('#utils/interactions');
|
|||
const { editOrReply } = require('#utils/message')
|
||||
const { STATICS } = require('#utils/statics')
|
||||
|
||||
const { ApplicationCommandTypes } = require("detritus-client/lib/constants");
|
||||
const { ApplicationCommandTypes, InteractionContextTypes, ApplicationIntegrationTypes } = require("detritus-client/lib/constants");
|
||||
|
||||
// TODO: create a favicon() util
|
||||
function createReverseImageSearchResultPage(context, result, source) {
|
||||
|
@ -38,12 +38,12 @@ module.exports = {
|
|||
name: 'Reverse Image Search',
|
||||
type: ApplicationCommandTypes.MESSAGE,
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
run: async (context, args) => {
|
||||
try{
|
||||
|
|
|
@ -6,7 +6,7 @@ const { editOrReply } = require('#utils/message');
|
|||
const { codeblock } = require('#utils/markdown');
|
||||
const { STATICS } = require('#utils/statics');
|
||||
|
||||
const { ApplicationCommandTypes, MessageFlags } = require("detritus-client/lib/constants");
|
||||
const { ApplicationCommandTypes, MessageFlags, InteractionContextTypes, ApplicationIntegrationTypes } = require("detritus-client/lib/constants");
|
||||
const { PERMISSION_GROUPS } = require('#constants');
|
||||
;
|
||||
|
||||
|
@ -14,12 +14,12 @@ module.exports = {
|
|||
name: 'Transcribe Voice Message',
|
||||
type: ApplicationCommandTypes.MESSAGE,
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
run: async (context, args) => {
|
||||
await acknowledge(context, false, [...PERMISSION_GROUPS.baseline_slash]);
|
||||
|
|
|
@ -7,19 +7,19 @@ const { codeblock, icon, pill } = require('#utils/markdown');
|
|||
const { editOrReply } = require('#utils/message');
|
||||
const { STATICS } = require('#utils/statics');
|
||||
|
||||
const { ApplicationCommandTypes, InteractionCallbackTypes } = require("detritus-client/lib/constants");
|
||||
const { ApplicationCommandTypes, InteractionCallbackTypes, InteractionContextTypes, ApplicationIntegrationTypes } = require("detritus-client/lib/constants");
|
||||
const { Components } = require('detritus-client/lib/utils');
|
||||
|
||||
module.exports = {
|
||||
name: 'Translate Message',
|
||||
type: ApplicationCommandTypes.MESSAGE,
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
run: async (context, args) => {
|
||||
await acknowledge(context, false, [...PERMISSION_GROUPS.baseline_slash]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue