adds incognito mode, fixes /emoji

This commit is contained in:
bignutty 2024-06-11 23:16:40 +02:00
parent fbdf212151
commit e61a604b7c
36 changed files with 401 additions and 127 deletions

View file

@ -1,9 +1,10 @@
const { otter } = require('#api');
const { createEmbed } = require('#utils/embed')
const { createEmbed } = require('#utils/embed');
const { acknowledge } = require('#utils/interactions');
const { editOrReply } = require('#utils/message')
const { InteractionCallbackTypes } = require("detritus-client/lib/constants");
const { ApplicationCommandOptionTypes } = require("detritus-client/lib/constants");
module.exports = {
description: 'Shows a random otter picture.',
@ -16,8 +17,17 @@ module.exports = {
integrationTypes: [
1
],
run: async (context) => {
await context.respond({data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE})
options: [
{
name: 'incognito',
description: 'Makes the response only visible to you.',
type: ApplicationCommandOptionTypes.BOOLEAN,
required: false,
default: false
}
],
run: async (context, args) => {
await acknowledge(context, args.incognito);
try{
const ott = (await otter()).response.body