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 list all banned users in a specified Discord server (guild). It is useful for server administrators or moderators who want to retrieve and review the list of users banned from their server. For example, it can be used to audit bans or manage ban records programmatically.
Use Case Examples
- Retrieve a list of all banned users in a guild to display in a moderation dashboard.
- Fetch banned user details to cross-check with an external ban management system.
Properties
| Name | Meaning |
|---|---|
| Guild ID | The ID of the Discord server (guild) from which to list banned users. |
| Additional Fields | Optional fields for other operations but not used specifically for listing bans in this operation. |
Output
JSON
userId- The ID of the banned user.username- The username of the banned user.reason- The reason for the ban, if provided.
Dependencies
- Discord API with bot token authentication
Troubleshooting
- Ensure the provided Guild ID is correct and the bot has permission to access the guild.
- The bot must have the 'Ban Members' permission to fetch the list of bans.
- If the bot token is invalid or expired, authentication will fail.
- Invalid or missing Guild ID will cause the operation to fail with a 'Guild not found' error.
Links
- Discord.js Guild Bans Documentation - Official documentation for fetching bans from a Discord guild using discord.js library.