mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 06:03:04 -04:00
add debug tools
This commit is contained in:
parent
4ca9780fec
commit
13e4fb2976
2 changed files with 13 additions and 1 deletions
|
@ -19,11 +19,23 @@ module.exports.acknowledge = async function(context, incognito = false, permissi
|
|||
|
||||
// Handle permissions for user commands in a guild context
|
||||
if(context.member && permissions.length >= 1){
|
||||
let perr=[]
|
||||
for(const p of permissions){
|
||||
if(!checkPermissions(context.member.permissions, p)){
|
||||
incognito = true;
|
||||
context._meta.incognitoReason = INCOGNITO_REASONS.permissions;
|
||||
}
|
||||
perr.push([PERMISSIONS_TEXT[p], checkPermissions(context.member.permissions, p)])
|
||||
}
|
||||
if(perr.length >= 1) {
|
||||
// via pbdiag (https://canary.discord.com/channels/949405492491452496/949414053418242118/1326684780355653815)
|
||||
context._meta.incognitoMetadata = "https://bignutty.gitlab.io/diag?pbdiag=" + Buffer.from(JSON.stringify([
|
||||
1,
|
||||
[
|
||||
perr.map((p)=>p[0]),
|
||||
perr.map((p)=>p[1]),
|
||||
]
|
||||
])).toString("base64");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue