Skip to main content
Glama

unban_member

Remove a user ban on Discord servers through MCP integration, allowing moderation reversal with optional reason specification.

Instructions

Remove a ban for a user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idYes
server_idNo
reasonNo

Implementation Reference

  • The handler function for the 'unban_member' tool. It fetches the guild and user, then calls guild.unban(user, reason) to remove the ban.
    async def unban_member( user_id: str | int, server_id: str | int | None = None, reason: str | None = None, ctx: Context = None, ) -> str: # type: ignore[override] """Remove a ban for a user.""" assert ctx is not None bot, config = await _acquire(ctx) guild_id = _resolve_guild_id(config, server_id) guild = await _ensure_guild(bot, guild_id) user = await _call_discord("fetch user", bot.fetch_user(_require_int(user_id, "user_id"))) await _call_discord("unban member", guild.unban(user, reason=reason)) return f"Unbanned {user.display_name} ({user.id}) from {guild.name}."

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wowjinxy/mcp-discord'

If you have feedback or need assistance with the MCP directory API, please join our Discord server