modify_sticker
Update custom Discord stickers by changing their name, description, or tags within a server. Use this tool to manage and organize sticker collections.
Instructions
Modify a custom sticker in a server
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| guildId | Yes | The ID of the server (guild) | |
| stickerId | Yes | The ID of the sticker to modify | |
| name | No | New name for the sticker | |
| description | No | New description | |
| tags | No | New tags | |
| reason | No | Reason for modifying |
Implementation Reference
- src/tools/emoji-tools.ts:270-297 (handler)Handler function implementing the modify_sticker tool: fetches guild and sticker, prepares optional edit data, performs the edit, handles errors with withErrorHandling, and formats response.async ({ guildId, stickerId, name, description, tags, reason }) => { const result = await withErrorHandling(async () => { const client = await getDiscordClient(); const guild = await client.guilds.fetch(guildId); const sticker = await guild.stickers.fetch(stickerId); const editData: { name?: string; description?: string; tags?: string; reason?: string } = {}; if (name) editData.name = name; if (description) editData.description = description; if (tags) editData.tags = tags; if (reason) editData.reason = reason; const updated = await sticker.edit(editData); return { id: updated.id, name: updated.name, description: updated.description, tags: updated.tags, message: 'Sticker updated successfully', }; }); if (!result.success) { return { content: [{ type: 'text', text: result.error }], isError: true }; } return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
- src/tools/emoji-tools.ts:262-268 (schema)Zod input schema defining parameters for the modify_sticker tool.{ guildId: z.string().describe('The ID of the server (guild)'), stickerId: z.string().describe('The ID of the sticker to modify'), name: z.string().optional().describe('New name for the sticker'), description: z.string().optional().describe('New description'), tags: z.string().optional().describe('New tags'), reason: z.string().optional().describe('Reason for modifying'),
- src/tools/emoji-tools.ts:258-300 (registration)Direct registration of the modify_sticker tool using server.tool(), including name, description, input schema, and inline handler.// Modify sticker server.tool( 'modify_sticker', 'Modify a custom sticker in a server', { guildId: z.string().describe('The ID of the server (guild)'), stickerId: z.string().describe('The ID of the sticker to modify'), name: z.string().optional().describe('New name for the sticker'), description: z.string().optional().describe('New description'), tags: z.string().optional().describe('New tags'), reason: z.string().optional().describe('Reason for modifying'), }, async ({ guildId, stickerId, name, description, tags, reason }) => { const result = await withErrorHandling(async () => { const client = await getDiscordClient(); const guild = await client.guilds.fetch(guildId); const sticker = await guild.stickers.fetch(stickerId); const editData: { name?: string; description?: string; tags?: string; reason?: string } = {}; if (name) editData.name = name; if (description) editData.description = description; if (tags) editData.tags = tags; if (reason) editData.reason = reason; const updated = await sticker.edit(editData); return { id: updated.id, name: updated.name, description: updated.description, tags: updated.tags, message: 'Sticker updated successfully', }; }); if (!result.success) { return { content: [{ type: 'text', text: result.error }], isError: true }; } return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] }; } ); }
- src/index.ts:59-59 (registration)Invocation of registerEmojiTools(server) which registers multiple emoji/sticker tools including modify_sticker.registerEmojiTools(server);