discord_delete_role
Delete a role from a Discord server by specifying the guild ID and role ID. This tool removes unwanted or outdated roles to maintain organized server permissions.
Instructions
Delete a role from a guild.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| guild_id | Yes | ||
| role_id | Yes | ||
| reason | No |
Implementation Reference
- src/tools/roles.ts:165-170 (handler)The handler implementation for 'discord_delete_role', which fetches the guild and role, then deletes the role.
case "discord_delete_role": { const guild = await discord.guilds.fetch(validateId(args.guild_id, "guild_id")); const role = await guild.roles.fetch(args.role_id as string) as Role; await role.delete(args.reason as string | undefined); return { content: [{ type: "text", text: `✅ Role "${role.name}" deleted.` }] }; } - src/tools/roles.ts:50-61 (schema)The schema definition for 'discord_delete_role', specifying required guild_id and role_id.
name: "discord_delete_role", description: "Delete a role from a guild.", inputSchema: { type: "object", properties: { guild_id: { type: "string" }, role_id: { type: "string" }, reason: { type: "string" }, }, required: ["guild_id", "role_id"], }, },