mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-10 23:23:08 -04:00
adds incognito mode, fixes /emoji
This commit is contained in:
parent
fbdf212151
commit
e61a604b7c
36 changed files with 401 additions and 127 deletions
|
@ -2,11 +2,12 @@ const { dictionary } = require('#api');
|
|||
const { paginator } = require('#client');
|
||||
const { TRANSLATE_LANGUAGE_MAPPINGS, DICTIONARY_LANGUAGES } = require('#constants');
|
||||
|
||||
const { createEmbed, formatPaginationEmbeds, page } = require('#utils/embed')
|
||||
const { createEmbed, formatPaginationEmbeds, page } = require('#utils/embed');
|
||||
const { acknowledge } = require('#utils/interactions');
|
||||
const { link, iconPill, smallPill, icon, iconLinkPill, pill } = require('#utils/markdown')
|
||||
const { editOrReply } = require('#utils/message')
|
||||
|
||||
const { ApplicationCommandOptionTypes, InteractionCallbackTypes } = require('detritus-client/lib/constants');
|
||||
const { ApplicationCommandOptionTypes } = require('detritus-client/lib/constants');
|
||||
|
||||
const LABELS = {
|
||||
"offensive": `${iconPill("warning", "Offensive")}`
|
||||
|
@ -65,10 +66,17 @@ module.exports = {
|
|||
description: 'Term to look up.',
|
||||
type: ApplicationCommandOptionTypes.TEXT,
|
||||
required: true
|
||||
},
|
||||
{
|
||||
name: 'incognito',
|
||||
description: 'Makes the response only visible to you.',
|
||||
type: ApplicationCommandOptionTypes.BOOLEAN,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
],
|
||||
run: async (context, args) => {
|
||||
await context.respond({data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE})
|
||||
await acknowledge(context, args.incognito);
|
||||
|
||||
try{
|
||||
let search = await dictionary(context, args.term, "en")
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const { emojipedia, emojiKitchen } = require("#api");
|
||||
|
||||
const { createEmbed } = require("#utils/embed");
|
||||
const { acknowledge } = require("#utils/interactions");
|
||||
const { icon, pill, iconPill, highlight, timestamp } = require("#utils/markdown");
|
||||
const { editOrReply } = require("#utils/message");
|
||||
const { STATICS } = require("#utils/statics");
|
||||
|
@ -8,7 +9,7 @@ const { STATICS } = require("#utils/statics");
|
|||
const { ingest } = require("#logging");
|
||||
|
||||
const { Utils } = require("detritus-client");
|
||||
const { InteractionCallbackTypes, ApplicationCommandOptionTypes } = require("detritus-client/lib/constants");
|
||||
const { InteractionCallbackTypes, ApplicationCommandOptionTypes, DiscordRegexNames } = require("detritus-client/lib/constants");
|
||||
const { Components, Snowflake } = require("detritus-client/lib/utils");
|
||||
|
||||
const onlyEmoji = require('emoji-aware').onlyEmoji;
|
||||
|
@ -53,13 +54,20 @@ module.exports = {
|
|||
description: 'Emoji to enlarge. Use two built-in emoji to mix them.',
|
||||
type: ApplicationCommandOptionTypes.TEXT,
|
||||
required: true
|
||||
},
|
||||
{
|
||||
name: 'incognito',
|
||||
description: 'Makes the response only visible to you.',
|
||||
type: ApplicationCommandOptionTypes.BOOLEAN,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
],
|
||||
run: async (context, args) => {
|
||||
await context.respond({data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE})
|
||||
await acknowledge(context, args.incognito);
|
||||
|
||||
const { matches } = Utils.regex(
|
||||
Constants.DiscordRegexNames.EMOJI,
|
||||
DiscordRegexNames.EMOJI,
|
||||
args.emoji
|
||||
);
|
||||
embeds = []
|
||||
|
|
|
@ -7,6 +7,7 @@ const { STATICS } = require("#utils/statics");
|
|||
|
||||
const { Components } = require("detritus-client/lib/utils");
|
||||
const { InteractionCallbackTypes, MessageComponentButtonStyles, ApplicationCommandOptionTypes } = require("detritus-client/lib/constants");
|
||||
const { acknowledge } = require("#utils/interactions");
|
||||
|
||||
const onlyEmoji = require('emoji-aware').onlyEmoji;
|
||||
|
||||
|
@ -48,10 +49,17 @@ module.exports = {
|
|||
description: 'Emoji to enlarge. Use two built-in emoji to mix them.',
|
||||
type: ApplicationCommandOptionTypes.TEXT,
|
||||
required: true
|
||||
},
|
||||
{
|
||||
name: 'incognito',
|
||||
description: 'Makes the response only visible to you.',
|
||||
type: ApplicationCommandOptionTypes.BOOLEAN,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
],
|
||||
run: async (context, args) => {
|
||||
await context.respond({data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE})
|
||||
await acknowledge(context, args.incognito);
|
||||
|
||||
const emoji = onlyEmoji(args.emoji)
|
||||
if(!emoji){
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
const { WebUtilsWebPageScreenshot} = require("#obelisk");
|
||||
|
||||
const { createEmbed } = require("#utils/embed");
|
||||
const { acknowledge } = require("#utils/interactions");
|
||||
const { editOrReply } = require("#utils/message");
|
||||
|
||||
const { ApplicationCommandOptionTypes, InteractionCallbackTypes } = require('detritus-client/lib/constants');
|
||||
const { ApplicationCommandOptionTypes } = require('detritus-client/lib/constants');
|
||||
|
||||
module.exports = {
|
||||
name: 'screenshot',
|
||||
|
@ -22,10 +23,17 @@ module.exports = {
|
|||
description: 'Website URL.',
|
||||
type: ApplicationCommandOptionTypes.TEXT,
|
||||
required: true
|
||||
},
|
||||
{
|
||||
name: 'incognito',
|
||||
description: 'Makes the response only visible to you.',
|
||||
type: ApplicationCommandOptionTypes.BOOLEAN,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
],
|
||||
run: async (context, args) => {
|
||||
await context.respond({data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE})
|
||||
await acknowledge(context, args.incognito);
|
||||
|
||||
await editOrReply(context, createEmbed("loading", context, `Creating website screenshot...`))
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
const { darksky } = require('#api');
|
||||
|
||||
const { createEmbed } = require('#utils/embed');
|
||||
const { acknowledge } = require('#utils/interactions');
|
||||
const { pill, iconPill, smallPill, weatherIcon, timestamp } = require('#utils/markdown');
|
||||
const { editOrReply } = require('#utils/message');
|
||||
const { STATICS } = require('#utils/statics');
|
||||
|
||||
const { ApplicationCommandOptionTypes, InteractionCallbackTypes } = require('detritus-client/lib/constants');
|
||||
const { ApplicationCommandOptionTypes } = require('detritus-client/lib/constants');
|
||||
|
||||
module.exports = {
|
||||
name: 'weather',
|
||||
|
@ -24,10 +25,17 @@ module.exports = {
|
|||
description: 'City or place to check.',
|
||||
type: ApplicationCommandOptionTypes.TEXT,
|
||||
required: true
|
||||
},
|
||||
{
|
||||
name: 'incognito',
|
||||
description: 'Makes the response only visible to you.',
|
||||
type: ApplicationCommandOptionTypes.BOOLEAN,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
],
|
||||
run: async (context, args) => {
|
||||
await context.respond({data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE})
|
||||
await acknowledge(context, args.incognito);
|
||||
|
||||
try{
|
||||
let data = await darksky(context, args.location)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue