Actions53
- Message Actions
- Channel Actions
- Thread Actions
- Reaction Actions
- Guild (Server) Actions
- Member Actions
- Role Actions
- Voice Actions
- DM Actions
- Webhook Actions
- Invite Actions
Overview
This node interacts with the Discord API to perform various operations on Discord guilds (servers), including banning a member from a guild. Specifically, the 'Ban Member' operation allows users to ban a specified member from a Discord server, optionally providing a reason and specifying how many days of the member's messages to delete. This is useful for server moderation to remove disruptive or unwanted members.
Use Case Examples
- Ban a user from a Discord server by providing the guild ID and user ID, optionally including a reason for the ban that appears in the audit log.
- Automatically ban members who violate server rules using an automated workflow that triggers this node with the appropriate parameters.
Properties
| Name | Meaning |
|---|---|
| Guild ID | The ID of the Discord server (guild) where the member will be banned. |
| User ID | The ID of the user to ban from the guild. |
| Additional Fields | Optional parameters for the ban action, including reason for the ban (appears in audit log) and number of days of messages to delete (0-7). |
Output
JSON
success- Indicates if the ban operation was successful.userId- The ID of the user who was banned.banned- Boolean indicating the user is banned (true).
Dependencies
- Discord API access via a bot token credential
Troubleshooting
- Ensure the bot token credential has the necessary permissions to ban members in the specified guild.
- Verify that the guild ID and user ID are correct and that the user is a member of the guild.
- The 'deleteMessageDays' field must be between 0 and 7; values outside this range may cause errors.
- If the bot lacks permission to ban members, the operation will fail with an error indicating insufficient permissions.
Links
- Discord.js GuildMemberManager.ban() - Official documentation for the ban method used to ban members from a guild.