1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-10 12:42:44 +01:00

🐛 fix permission

This commit is contained in:
Flam3rboy 2021-02-14 20:24:39 +01:00
parent 86700f88ab
commit 2859daeba8
4 changed files with 4 additions and 4 deletions

View File

@ -57,5 +57,5 @@ export declare class Permissions extends BitField {
};
}): bigint;
}
export declare function getPermission(user_id: bigint, guild_id: bigint, channel_id?: bigint): Promise<bigint>;
export declare function getPermission(user_id: bigint, guild_id: bigint, channel_id?: bigint): Promise<Permissions>;
export {};

View File

@ -105,7 +105,7 @@ async function getPermission(user_id, guild_id, channel_id) {
overwrites: channel?.permission_overwrites,
},
});
return permission;
return new Permissions(permission);
}
exports.getPermission = getPermission;
//# sourceMappingURL=Permissions.js.map

View File

@ -1 +1 @@
{"version":3,"file":"Permissions.js","sourceRoot":"","sources":["../../src/util/Permissions.ts"],"names":[],"mappings":";;;AAAA,8EAA8E;AAC9E,8DAA8D;AAC9D,6CAA+C;AAC/C,+CAAkE;AAElE,yCAAiD;AACjD,yCAAsC;AAqCtC,MAAa,WAAY,SAAQ,mBAAQ;IAmCxC,GAAG,CAAC,UAAgC,EAAE,UAAU,GAAG,IAAI;QACtD,OAAO,CAAC,UAAU,IAAI,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC5F,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,UAAgC,EAAE,UAAU,GAAG,IAAI;QACtD,OAAO,CAAC,UAAU,IAAI,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC5F,CAAC;IAED,MAAM,CAAC,iBAAiB,CAAC,UAAwC,EAAE,IAAa;QAC/E,6CAA6C;QAC7C,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,SAAS,EA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E,MAAM,CAAC,KAAK;SACnB;QACD,KAAK,EAAE;YACN,KAAK,EAAE,KAAK;SACZ;QACD,OAAO,EAAE;YACR,UAAU,EAAE,OAAO,EAAE,qBAAqB;SAC1C;KACD,CAAC,CAAC;IAEH,OAAO,IAAI,WAAW,CAAC,UAAU,CAAC,CAAC;AACpC,CAAC;AAxBD,sCAwBC"}

View File

@ -156,5 +156,5 @@ export async function getPermission(user_id: bigint, guild_id: bigint, channel_i
},
});
return permission;
return new Permissions(permission);
}