3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-17 07:05:03 +00:00

Merge branch 'ZeppelinBot:master' into master

This commit is contained in:
iamshoXy 2023-12-29 00:50:37 +01:00 committed by GitHub
commit 158380ad7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 82 additions and 27 deletions

View file

@ -126,7 +126,7 @@ export function initGuildsAPI(app: express.Express) {
if (type !== ApiPermissionTypes.User) {
return clientError(res, "Invalid type");
}
if (!isSnowflake(targetId)) {
if (!isSnowflake(targetId) || targetId === req.user!.userId) {
return clientError(res, "Invalid targetId");
}
const validPermissions = new Set(Object.values(ApiPermissions));