style(scripts): prettier reflow on Discord perms diagnostic
Follow-up to 0d87778; the pre-commit prettier hook rewrapped a few long console.log lines after the commit landed.
This commit is contained in:
@@ -63,7 +63,9 @@ async function diagnose(role: string, token: string) {
|
||||
client.login(token).catch(reject);
|
||||
});
|
||||
|
||||
console.log(`\n=== role=${role} bot=${client.user?.tag} (id=${client.user?.id}) ===`);
|
||||
console.log(
|
||||
`\n=== role=${role} bot=${client.user?.tag} (id=${client.user?.id}) ===`,
|
||||
);
|
||||
const guilds = await client.guilds.fetch();
|
||||
for (const [gid, partial] of guilds) {
|
||||
const guild = await partial.fetch();
|
||||
@@ -71,10 +73,16 @@ async function diagnose(role: string, token: string) {
|
||||
const perms = me.permissions;
|
||||
const has: Record<string, boolean> = {};
|
||||
for (const name of RELEVANT) {
|
||||
has[name] = perms.has(PermissionsBitField.Flags[name as keyof typeof PermissionsBitField.Flags]);
|
||||
has[name] = perms.has(
|
||||
PermissionsBitField.Flags[
|
||||
name as keyof typeof PermissionsBitField.Flags
|
||||
],
|
||||
);
|
||||
}
|
||||
console.log(` guild=${guild.name} (id=${gid})`);
|
||||
console.log(` admin=${perms.has(PermissionsBitField.Flags.Administrator)}`);
|
||||
console.log(
|
||||
` admin=${perms.has(PermissionsBitField.Flags.Administrator)}`,
|
||||
);
|
||||
for (const name of RELEVANT) console.log(` ${name}=${has[name]}`);
|
||||
}
|
||||
client.destroy();
|
||||
|
||||
Reference in New Issue
Block a user