#application command permissions
1 messages · Page 1 of 1 (latest)
So, what do you exactly with this property? You have to do an API call with it somewhere
this is really just a template i got since im quite new to typescript and im not 100% sure how it works
but that CommandType is being used in another file
import { CommandType } from "../typings/Command";
export class Command {
constructor(commandOptions: CommandType) {
Object.assign(this, commandOptions);
}
}
and the commands use this
import { Command } from "../../structures/Command";
export default new Command({
...
run: async ({ client, interaction }) => {
...
}
})
and how do you deploy the permissions? Just adding them to a class won't register them in the API
thats the thing
im not like deploying the permissions in the javascript bot i have either
or wait
i have this deploy command from my js bot that i think i deployed all commands and the permissions to them
and i used this in the ready event instead of using the this.guilds.cache.get(guildId)?.commands.set(commands);
this.guilds.cache.get(guildId)?.commands.set([]);
const commandData = {
name: "deploy",
description: "Deploy command Setup",
options: [
{
name: "command",
type: "STRING",
description: "Command to deploy",
required: false,
},
],
}
this.guilds.cache.get(guildId)?.commands.create(commandData);
that's a not a good idea. Please refer to the guide on how to deploy commands and permissions
will it work in TS tho?
because im getting all kinds of errors