feat: enhance role handling by updating reply structure and adding role assignment functionality

This commit is contained in:
MythEclipse
2026-05-16 00:32:29 +07:00
parent c6ee7bb8c6
commit 41c6b567a6
6 changed files with 38 additions and 18 deletions
+3
View File
@@ -28,6 +28,7 @@ export type RoleRepository = {
listRoles(): Promise<ExistingRole[]>;
createRole(input: { name: string; color: string | null; permissions: string[]; position: number }): Promise<{ id: string }>;
updateRole(roleId: string, input: { name?: string; color?: string | null; icon?: string | null }): Promise<void>;
assignRole(userId: string, roleId: string): Promise<void>;
deleteRole(roleId: string): Promise<void>;
};
@@ -83,6 +84,8 @@ export class BoosterRoleService {
await this.roles.updateRole(role.id, { icon: input.icon.dataUri });
}
await this.roles.assignRole(userId, role.id);
const timestamp = this.now();
const record = {
guildId,