You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.
import{Discord,Slash,Group,Description,Permission}from"@typeit/discord";import{CommandInteraction,TextChannel}from"discord.js";
@Discord()
@Permission("753182939352793138",'ROLE')
@Group("maintenance","Commandes de maintenance réservées aux Admins")abstractclassmaintenance{
@Slash('purgeChannel')
@Description("Clone et supprime le salon afin de supprimer son contenu")privatepurgeChannel(interaction: CommandInteraction){constchannel=<TextChannel>interaction.channel;channel.clone({reason: `Purge du salon demandé par ${interaction.user.username}`});channel.delete(`Purge du salon demandé par ${interaction.user.username}`);}}
I also tried with the doc example
import{Discord,Permission,Slash}from'@typeit/discord';
@Discord()
@Permission("227882902031958016","USER")// Only the role that has this USER_ID can use this command
@Permission("753182939352793138","ROLE")// Only the role that has this ROLE_ID can use this commandclassDiscordBot{
@Slash("hello")// Only the role that has this ROLE_ID can use this commandprivatehello(){// ...}
@Slash("hello2")// Only the role that has this ROLE_ID can use this commandprivatehello2(){// ...}}
But it throw the same error.
Thx in advance <3
PS: Idk if it's linked but i can't use multiple @Permission, it only take the last, maybe i will create a different issue for that
The text was updated successfully, but these errors were encountered:
Hi, i'm trying to use @Permission decoration to make a Group Slash with a role permission but it always throw me this error
I also tried with the doc example
But it throw the same error.
Thx in advance <3
PS: Idk if it's linked but i can't use multiple @Permission, it only take the last, maybe i will create a different issue for that
The text was updated successfully, but these errors were encountered: