#so you want it to return ManageGuild
1 messages · Page 1 of 1 (latest)
You could manually create a dictionary which converts PermissionsBitField.Flags.xxx to a string
discord js does not have a converter ?
Like:
const permissionsString {
PermissionsBitField.Flags.xxx: 'xxx',
PermissionsBitField.Flags.xxx: 'xxx',
...
}
I don't think so
bruhh
cause there's not really much of a use for it
what are you trying to do with the string?
cause I'm not sure there is any use case for this...
so i put the required permission bitfild in my command when user execute and user dont have it i need to to tell them they need that bitfild permission
you could do new PermissionsBitField(PermissionFlagBits.ManageGuild).toArray() which will return 'ManageGuild' as the string permission
thx
man I'm dumb
xd
ye thx
since PermissionFlagsBits.ManageGuild returns 32n, toArray() returns the actual name of the bit
You'd have to do var[0] since it's an array
uh no, not in this case
what
i mean you could if you wanted the array brackets removed
still returns the permission name regardless
but I'm pretty sure if you tried to modify it(like concat it) then it wouldn't work(i think)
cool ig