feat(guild): duplicate role, plus delete and hover in roles sidebar (#2105)

This commit is contained in:
Hampus authored and GitHub committed 2026-08-30 00:12:36 +02:00
1 parent 19efbd3d61
commit 8f20b29b16
6 files changed
+198 -16

No files matched your search

@@ -254,10 +254,11 @@ export async function updateVanityURL(guildId: string, code: string | null): Pro
}
}
export async function createRole(guildId: string, name: string): Promise<void> {
export async function createRole(guildId: string, name: string): Promise<GuildRole> {
try {
await http.post(Endpoints.GUILD_ROLES(guildId), {body: {name}});
const response = await http.post<GuildRole>(Endpoints.GUILD_ROLES(guildId), {body: {name}});
logger.debug(`Created role "${name}" in guild ${guildId}`);
return response.body;
} catch (error) {
logger.error(`Failed to create role in guild ${guildId}:`, error);
throw error;