Hi, i'm trying to use @Permission decoration to make a Group Slash with a role permission but it always throw me this error
D:\depotsGit\Bot-Discord-IUT-Nancy-Charlemagne\node_modules\reflect-metadata\Reflect.js:544
throw new TypeError();
^
TypeError:
at DecorateConstructor (D:\depotsGit\Bot-Discord-IUT-Nancy-Charlemagne\node_modules\reflect-metadata\Reflect.js:544:31)
at Reflect.decorate (D:\depotsGit\Bot-Discord-IUT-Nancy-Charlemagne\node_modules\reflect-metadata\Reflect.js:130:24)
at Object.__decorate (D:\depotsGit\Bot-Discord-IUT-Nancy-Charlemagne\node_modules\tslib\tslib.js:98:96)
at Object.<anonymous> (D:\depotsGit\Bot-Discord-IUT-Nancy-Charlemagne\commands\Test.ts:6:17)
at Module._compile (node:internal/modules/cjs/loader:1109:14)
at Module.m._compile (C:\Users\hugob\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:1295:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
at Object.require.extensions.<computed> [as .ts] (C:\Users\hugob\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:1298:12)
at Module.load (node:internal/modules/cjs/loader:989:32)
at Function.Module._load (node:internal/modules/cjs/loader:829:14)
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 command
class DiscordBot {
@Slash("hello") // Only the role that has this ROLE_ID can use this command
private hello(
) {
// ...
}
@Slash("hello2") // Only the role that has this ROLE_ID can use this command
private hello2(
) {
// ...
}
}
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
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