Actions30
- Message Actions
- User Actions
- Channel Actions
- Guild Actions
- Emoji Actions
- Analytics Actions
- Moderation Actions
- Backup Actions
- DM Actions
Overview
This node operation checks the permissions of a specified user within a particular channel of a Discord server (guild). It is useful for scenarios where you need to verify what actions a user is allowed to perform in a channel, such as managing messages, sending messages, or managing channels. For example, it can be used in moderation workflows to ensure a user has the necessary permissions before allowing certain actions.
Use Case Examples
- Check if a user has administrator permissions in a specific channel before allowing them to moderate messages.
- Verify if a user can send messages or add reactions in a channel to customize user experience or automate responses.
Properties
| Name | Meaning |
|---|---|
| Guild ID | The ID of the Discord server (guild) where the channel and user exist. |
| Channel ID | The ID of the channel within the guild where permissions are checked. |
| User ID | The ID of the user whose permissions are being checked. |
Output
JSON
userId- The ID of the user whose permissions were checked.username- The username of the user.guildId- The ID of the guild (server) where the permissions were checked.channelId- The ID of the channel where the permissions were checked.permissionsadministrator- Boolean indicating if the user has Administrator permission.manageChannels- Boolean indicating if the user can manage channels.manageMessages- Boolean indicating if the user can manage messages.sendMessages- Boolean indicating if the user can send messages.readMessages- Boolean indicating if the user can read messages (view channel).embedLinks- Boolean indicating if the user can embed links in messages.attachFiles- Boolean indicating if the user can attach files in messages.mentionEveryone- Boolean indicating if the user can mention everyone in messages.addReactions- Boolean indicating if the user can add reactions to messages.
Dependencies
- Discord API via discord.js library
- An API key credential for Discord bot authentication
Troubleshooting
- Ensure the provided Guild ID, Channel ID, and User ID are correct and that the bot has access to the specified guild and channel.
- Common errors include 'Channel not found' if the channel ID is invalid or the bot lacks access, and 'Channel mismatch' if the channel does not belong to the specified guild.
- If permissions are null, verify the user is a member of the guild and the channel exists.
Links
- Discord Permissions Documentation - Official Discord documentation on permissions and permission flags.