fedimbed: try adding perms to slash command

This commit is contained in:
Cynthia Foxwell 2024-05-17 15:36:02 -06:00
parent 4fd751308c
commit 0e3c2e3952

View file

@ -1,5 +1,6 @@
const Dysnomia = require("@projectdysnomia/dysnomia");
const {MessageFlags, ApplicationCommandOptionTypes} = Dysnomia.Constants;
const {MessageFlags, ApplicationCommandOptionTypes, Permissions} =
Dysnomia.Constants;
const fs = require("node:fs");
const path = require("node:path");
const httpSignature = require("@peertube/http-signature");
@ -1095,6 +1096,7 @@ fedimbedCommand.options.spoiler = {
required: false,
default: false,
};
fedimbedCommand.permissions = Permissions.embedLinks | Permissions.attachFiles;
fedimbedCommand.callback = async function (interaction) {
let url = getOption(interaction, fedimbedCommand, "url");
const spoiler = getOption(interaction, fedimbedCommand, "spoiler");