mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 05:25:40 +09:00
fix(api): correct guild permission and mfa checks (#2499)
This commit is contained in:
1 parent
f392636857
commit
908e1b8bd4
12 files changed
+303
-86
No files matched your search
@@ -914,11 +914,16 @@ export class GuildMemberOperationsService {
|
||||
if (userId !== targetId) {
|
||||
await checkTargetMember(targetId);
|
||||
}
|
||||
if (data.mute !== undefined || data.deaf !== undefined) {
|
||||
if (data.mute !== undefined) {
|
||||
if (!(await hasPermission(Permissions.MUTE_MEMBERS))) {
|
||||
throw new MissingPermissionsError();
|
||||
}
|
||||
}
|
||||
if (data.deaf !== undefined) {
|
||||
if (!(await hasPermission(Permissions.DEAFEN_MEMBERS))) {
|
||||
throw new MissingPermissionsError();
|
||||
}
|
||||
}
|
||||
if (data.channel_id !== undefined) {
|
||||
if (!(await hasPermission(Permissions.MOVE_MEMBERS))) {
|
||||
throw new MissingPermissionsError();
|
||||
|
||||
Reference in new issue
Block a user