OIRNOIR
OIRNOIR
DIAdiscord.js - Imagine an app
Created by OIRNOIR on 12/14/2023 in #djs-questions
Is there a good way to check whether a user is eligible to run a command?
god I love BigInts
String(BigInt(guildId) - 1n)
String(BigInt(guildId) - 1n)
35 replies
DIAdiscord.js - Imagine an app
Created by OIRNOIR on 12/14/2023 in #djs-questions
Is there a good way to check whether a user is eligible to run a command?
if i were writing this library i would include a handy link to https://discord.com/developers/docs/interactions/application-commands#permissions on that page or at least a description that "oh, the atEveryone role is the guild id and the All Channels option is the guild id minus one"
35 replies
DIAdiscord.js - Imagine an app
Created by OIRNOIR on 12/14/2023 in #djs-questions
Is there a good way to check whether a user is eligible to run a command?
that sounds like such a hacky way to implement it but ok
35 replies
DIAdiscord.js - Imagine an app
Created by OIRNOIR on 12/14/2023 in #djs-questions
Is there a good way to check whether a user is eligible to run a command?
35 replies
DIAdiscord.js - Imagine an app
Created by OIRNOIR on 12/14/2023 in #djs-questions
Is there a good way to check whether a user is eligible to run a command?
Yep. I ran into a problem while checking these. How do I find the overwrite for the "All Channels" option you can set on command overwrites? In my server it seems to be exactly one less than the guild ID, but I can't verify that this is the same in all cases.
35 replies
DIAdiscord.js - Imagine an app
Created by OIRNOIR on 12/14/2023 in #djs-questions
Is there a good way to check whether a user is eligible to run a command?
Note: <ApplicationCommandPermissionsManager>.has() seems to be badly documented: The example says:
// Check whether a user has permission to use a command
But the function actually simply checks whether or not an override exists for the specified channel/role/user id (or the whole bot, if you pass client.user.id). It returns true if there is an override, false if there isn't.
35 replies
DIAdiscord.js - Imagine an app
Created by OIRNOIR on 12/14/2023 in #djs-questions
Is there a good way to check whether a user is eligible to run a command?
Thanks for the help though
35 replies
DIAdiscord.js - Imagine an app
Created by OIRNOIR on 12/14/2023 in #djs-questions
Is there a good way to check whether a user is eligible to run a command?
when discord listens to its users
35 replies
DIAdiscord.js - Imagine an app
Created by OIRNOIR on 12/14/2023 in #djs-questions
Is there a good way to check whether a user is eligible to run a command?
35 replies
DIAdiscord.js - Imagine an app
Created by OIRNOIR on 12/14/2023 in #djs-questions
Is there a good way to check whether a user is eligible to run a command?
I just wish there was a more viable way to make a specific component's required permissions the same as a command's.
35 replies
DIAdiscord.js - Imagine an app
Created by OIRNOIR on 12/14/2023 in #djs-questions
Is there a good way to check whether a user is eligible to run a command?
Of course.
35 replies
DIAdiscord.js - Imagine an app
Created by OIRNOIR on 12/14/2023 in #djs-questions
Is there a good way to check whether a user is eligible to run a command?
That's understandable, but in my opinion this could be widely useful for the discord.js community. If it has some quirks, we should try to not let those get in the way.
35 replies
DIAdiscord.js - Imagine an app
Created by OIRNOIR on 12/14/2023 in #djs-questions
Is there a good way to check whether a user is eligible to run a command?
In either case it would unfortunately probably have to be asynchronous since there isn't a pre-populated cache
35 replies
DIAdiscord.js - Imagine an app
Created by OIRNOIR on 12/14/2023 in #djs-questions
Is there a good way to check whether a user is eligible to run a command?
That means one would either have to fetch them every time (which is probably a waste) or set a set cache time (which runs the risk of going based on an outdated cache)
35 replies
DIAdiscord.js - Imagine an app
Created by OIRNOIR on 12/14/2023 in #djs-questions
Is there a good way to check whether a user is eligible to run a command?
Interesting
35 replies
DIAdiscord.js - Imagine an app
Created by OIRNOIR on 12/14/2023 in #djs-questions
Is there a good way to check whether a user is eligible to run a command?
there was an attempt to add a reaction on a message
35 replies