mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-10 15:13:04 -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
|
@ -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: [
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue