`ApplicationCommandPermissionsManager#fetch` typings issue
See original GitHub issueWhich package is this bug report for?
discord.js
Issue description
- Have a guild and try to fetch application command permissions using provided code sample.
- According to documentation,
options
parameter should be optional in the code sample below. - However, typescript complains that
options
parameter wasn’t provided.
Code sample
client.on('messageCreate', message => {
if (!message.inGuild()) return;
const permissions = message.guild.commands.permissions.fetch()
})
Package version
discord.js@14.0.0-dev.1655165434-b4e28a8
Node.js version
16.15.1, typescript 4.7.3
Operating system
Windows
Priority this issue should have
Medium (should be fixed soon)
Which partials do you have configured?
No Partials
Which gateway intents are you subscribing to?
Guilds, GuildMembers, GuildMessages
I have tested this issue on a development release
b4e28a8
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Updating from v12 to v13 - discord.js Guide
User#typingIn. As discord. js no longer caches typing event data, the User. typingIn() method has been removed.
Read more >chrome.permissions - Chrome Developers
Use the chrome.permissions API to request declared optional permissions at run time rather than install time, so users understand why the permissions are ......
Read more >Discord JS - DiscordAPIError: Missing Access - Stack Overflow
And for the scope select both "bot" and "applications.commands". Then scroll down choose whatever permission your bot need copy the URL.
Read more >Permission to Slash, Granted: Introducing Slash Command ...
Wow, it looks like you're all having a fabulous time using slash commands! /so /many /cool /things. Apps on Discord have been around...
Read more >API Reference - Discord.py
application_id ( int ) – The client's application ID. intents ( Intents ) –. The intents that you want to enable for the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
To workaround this issue you can just pass an empty object i.e
message.guild.commands.permissions.fetch({})
Figured an update 2 months later would be helpful for maintainers as they come in here and need to figure out if someone accidentally fixed this already. It wasn’t a complaint, just info for anyone that wants to tackle it in the future. Feel free to mark as off-topic.