mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 21:53:07 -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]);
|
||||
|
|
|
@ -5,18 +5,18 @@ const { createEmbed } = require('#utils/embed');
|
|||
const { acknowledge } = require('#utils/interactions');
|
||||
const { editOrReply } = require('#utils/message')
|
||||
|
||||
const { ApplicationCommandOptionTypes } = require("detritus-client/lib/constants");
|
||||
const { ApplicationCommandOptionTypes, InteractionContextTypes, ApplicationIntegrationTypes } = require("detritus-client/lib/constants");
|
||||
|
||||
module.exports = {
|
||||
description: 'Shows a random otter picture.',
|
||||
name: 'otter',
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
options: [
|
||||
{
|
||||
|
|
|
@ -4,18 +4,18 @@ const { acknowledge } = require('#utils/interactions');
|
|||
const { editOrReply } = require('#utils/message');
|
||||
const { getUserAvatar } = require('#utils/users');
|
||||
|
||||
const { ApplicationCommandOptionTypes } = require("detritus-client/lib/constants");
|
||||
const { ApplicationCommandOptionTypes, InteractionContextTypes, ApplicationIntegrationTypes } = require("detritus-client/lib/constants");
|
||||
|
||||
module.exports = {
|
||||
description: 'Get someones avatar.',
|
||||
name: 'avatar',
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
options: [
|
||||
{
|
||||
|
|
|
@ -6,18 +6,18 @@ const { smallIconPill, highlight, smallPill, icon, timestamp } = require('#utils
|
|||
const { editOrReply } = require('#utils/message');
|
||||
const { renderBadges, getUserAvatar } = require('#utils/users');
|
||||
|
||||
const { ApplicationCommandOptionTypes, UserFlags } = require("detritus-client/lib/constants");
|
||||
const { ApplicationCommandOptionTypes, UserFlags, InteractionContextTypes, ApplicationIntegrationTypes } = require("detritus-client/lib/constants");
|
||||
|
||||
module.exports = {
|
||||
description: 'Displays information about a user',
|
||||
name: 'user',
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
options: [
|
||||
{
|
||||
|
|
|
@ -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: [
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ const { link, citation, icon, smallPill, pill, codeblock } = require('#utils/mar
|
|||
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');
|
||||
|
||||
function renderFooter(context, doodle){
|
||||
if(doodle.super_g) return {
|
||||
|
@ -238,12 +238,12 @@ module.exports = {
|
|||
name: 'google',
|
||||
description: 'Search Google for websites.',
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
options: [
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ const { smallIconPill } = require('#utils/markdown');
|
|||
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');
|
||||
|
||||
const META_FIELDS = {
|
||||
"Album": "stat_videos",
|
||||
|
@ -71,12 +71,12 @@ module.exports = {
|
|||
name: 'lyrics',
|
||||
description: 'Search for song lyrics.',
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
options: [
|
||||
{
|
||||
|
|
|
@ -6,8 +6,8 @@ const { acknowledge } = require('#utils/interactions');
|
|||
const { link, icon, iconAsEmojiObject, citation } = require('#utils/markdown');
|
||||
const { editOrReply } = require('#utils/message')
|
||||
const { STATICS, STATIC_ASSETS } = require('#utils/statics');
|
||||
const { ApplicationCommandOptionTypes } = require('detritus-client/lib/constants');
|
||||
|
||||
const { ApplicationCommandOptionTypes, InteractionContextTypes, ApplicationIntegrationTypes } = require('detritus-client/lib/constants');
|
||||
const { Components } = require('detritus-client/lib/utils');
|
||||
|
||||
function renderPlaceCard(context, place) {
|
||||
|
@ -85,12 +85,12 @@ module.exports = {
|
|||
name: 'maps',
|
||||
description: 'Search for places on Google Maps.',
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
options: [
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ const { link, iconPill } = require('#utils/markdown')
|
|||
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");
|
||||
|
||||
function createUrbanPage(context, result){
|
||||
let e = createEmbed("default", context, {
|
||||
|
@ -41,12 +41,12 @@ module.exports = {
|
|||
name: 'urbandictionary',
|
||||
description: 'Define a word on urban dictionary.',
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
options: [
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ const { citation } = require('#utils/markdown');
|
|||
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');
|
||||
|
||||
function createWolframPage(context, pod, query, sources) {
|
||||
let res = page(createEmbed("default", context, {
|
||||
|
@ -45,12 +45,12 @@ module.exports = {
|
|||
name: 'wolframalpha',
|
||||
description: 'Compute a query via Wolfram|Alpha.',
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
options: [
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@ const { createEmbed, formatPaginationEmbeds, page } = require('#utils/embed');
|
|||
const { acknowledge } = require('#utils/interactions');
|
||||
const { editOrReply } = require('#utils/message')
|
||||
|
||||
const { ApplicationCommandOptionTypes } = require('detritus-client/lib/constants');
|
||||
const { ApplicationCommandOptionTypes, InteractionContextTypes, ApplicationIntegrationTypes } = require('detritus-client/lib/constants');
|
||||
|
||||
const superagent = require('superagent')
|
||||
|
||||
|
@ -13,12 +13,12 @@ module.exports = {
|
|||
name: 'xkcd',
|
||||
description: 'Search for XKCD comics.',
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
options: [
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ const { link, iconPill, timestamp } = require('#utils/markdown')
|
|||
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: Move this to a numbers utility
|
||||
// https://www.html-code-generator.com/javascript/shorten-long-numbers
|
||||
|
@ -112,12 +112,12 @@ module.exports = {
|
|||
name: 'youtube',
|
||||
description: 'Search for videos on YouTube.',
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
options: [
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@ const { acknowledge } = require('#utils/interactions');
|
|||
const { link, iconPill, smallPill, icon, iconLinkPill, pill } = require('#utils/markdown')
|
||||
const { editOrReply } = require('#utils/message')
|
||||
|
||||
const { ApplicationCommandOptionTypes } = require('detritus-client/lib/constants');
|
||||
const { ApplicationCommandOptionTypes, InteractionContextTypes, ApplicationIntegrationTypes } = require('detritus-client/lib/constants');
|
||||
|
||||
const LABELS = {
|
||||
"offensive": `${iconPill("warning", "Offensive")}`
|
||||
|
@ -53,12 +53,12 @@ module.exports = {
|
|||
name: 'dictionary',
|
||||
description: 'Define a word from the dictionary.',
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
options: [
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ const { STATICS, STATIC_ASSETS } = require("#utils/statics");
|
|||
const { ingest } = require("#logging");
|
||||
|
||||
const { Utils } = require("detritus-client");
|
||||
const { InteractionCallbackTypes, ApplicationCommandOptionTypes, DiscordRegexNames } = require("detritus-client/lib/constants");
|
||||
const { InteractionCallbackTypes, ApplicationCommandOptionTypes, DiscordRegexNames, InteractionContextTypes, ApplicationIntegrationTypes } = require("detritus-client/lib/constants");
|
||||
const { Components, Snowflake } = require("detritus-client/lib/utils");
|
||||
const { PERMISSION_GROUPS } = require("#constants");
|
||||
|
||||
|
@ -42,12 +42,12 @@ module.exports = {
|
|||
use_custom_ingest: true
|
||||
},
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
options: [
|
||||
{
|
||||
|
|
|
@ -6,43 +6,22 @@ const { editOrReply } = require("#utils/message");
|
|||
const { STATICS, STATIC_ASSETS } = require("#utils/statics");
|
||||
|
||||
const { Components } = require("detritus-client/lib/utils");
|
||||
const { InteractionCallbackTypes, MessageComponentButtonStyles, ApplicationCommandOptionTypes } = require("detritus-client/lib/constants");
|
||||
const { InteractionCallbackTypes, MessageComponentButtonStyles, ApplicationCommandOptionTypes, InteractionContextTypes, ApplicationIntegrationTypes } = require("detritus-client/lib/constants");
|
||||
const { acknowledge } = require("#utils/interactions");
|
||||
const { PERMISSION_GROUPS } = require("#constants");
|
||||
|
||||
const onlyEmoji = require('emoji-aware').onlyEmoji;
|
||||
|
||||
function toCodePoint(unicodeSurrogates, sep) {
|
||||
var
|
||||
r = [],
|
||||
c = 0,
|
||||
p = 0,
|
||||
i = 0;
|
||||
while (i < unicodeSurrogates.length) {
|
||||
c = unicodeSurrogates.charCodeAt(i++);
|
||||
if (p) {
|
||||
r.push((0x10000 + ((p - 0xD800) << 10) + (c - 0xDC00)).toString(16));
|
||||
p = 0;
|
||||
} else if (0xD800 <= c && c <= 0xDBFF) {
|
||||
p = c;
|
||||
} else {
|
||||
r.push(c.toString(16));
|
||||
}
|
||||
}
|
||||
return r.join(sep || '-');
|
||||
}
|
||||
|
||||
|
||||
module.exports = {
|
||||
name: 'emojipedia',
|
||||
description: 'Shows detailed information about an emoji.',
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
options: [
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ const { createEmbed } = require('#utils/embed');
|
|||
const { acknowledge } = require('#utils/interactions');
|
||||
const { editOrReply } = require('#utils/message');
|
||||
|
||||
const { ApplicationCommandOptionTypes } = require("detritus-client/lib/constants");;
|
||||
const { ApplicationCommandOptionTypes, InteractionContextTypes, ApplicationIntegrationTypes } = require("detritus-client/lib/constants");;
|
||||
|
||||
const superagent = require('superagent')
|
||||
|
||||
|
@ -14,12 +14,12 @@ module.exports = {
|
|||
name: 'music-platforms',
|
||||
description: 'Get links for a song across all streaming platforms.',
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
options: [
|
||||
{
|
||||
|
|
|
@ -8,18 +8,18 @@ const { codeblock, stringwrap } = require("#utils/markdown");
|
|||
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');
|
||||
|
||||
module.exports = {
|
||||
name: 'ocr',
|
||||
description: 'Reads text contents from an image.',
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
options: [
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@ const { createEmbed, formatPaginationEmbeds, page } = require("#utils/embed");
|
|||
const { acknowledge } = require("#utils/interactions");
|
||||
const { editOrReply } = require("#utils/message");
|
||||
|
||||
const { ApplicationCommandOptionTypes } = require('detritus-client/lib/constants');
|
||||
const { ApplicationCommandOptionTypes, InteractionContextTypes, ApplicationIntegrationTypes } = require('detritus-client/lib/constants');
|
||||
|
||||
// TODO: create a favicon() util
|
||||
function createReverseImageSearchResultPage(context, result, source) {
|
||||
|
@ -33,12 +33,12 @@ module.exports = {
|
|||
name: 'reverse-image-search',
|
||||
description: 'Searches for image matches on the internet.',
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
options: [
|
||||
{
|
||||
|
|
|
@ -5,18 +5,18 @@ const { createEmbed } = require("#utils/embed");
|
|||
const { acknowledge } = require("#utils/interactions");
|
||||
const { editOrReply } = require("#utils/message");
|
||||
|
||||
const { ApplicationCommandOptionTypes } = require('detritus-client/lib/constants');
|
||||
const { ApplicationCommandOptionTypes, InteractionContextTypes, ApplicationIntegrationTypes } = require('detritus-client/lib/constants');
|
||||
|
||||
module.exports = {
|
||||
name: 'screenshot',
|
||||
description: 'Create a screenshot of a website.',
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
options: [
|
||||
{
|
||||
|
|
|
@ -9,19 +9,19 @@ const { isSupported, getCodeFromAny } = require('#utils/translate');
|
|||
|
||||
const { translateLanguage } = require('#parameters').autocomplete;
|
||||
|
||||
const { ApplicationCommandOptionTypes } = require('detritus-client/lib/constants');
|
||||
const { ApplicationCommandOptionTypes, InteractionContextTypes, ApplicationIntegrationTypes } = require('detritus-client/lib/constants');
|
||||
const { acknowledge } = require('#utils/interactions');
|
||||
|
||||
module.exports = {
|
||||
name: 'translate',
|
||||
description: 'Translate text from and to other languages.',
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
options: [
|
||||
{
|
||||
|
|
|
@ -100,7 +100,6 @@ module.exports = {
|
|||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
ApplicationIntegrationTypes.GUILD_INSTALL,
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
options: [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue