mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +00:00
Utility: add voice information to !info, tweak embed styles a bit
This commit is contained in:
parent
9202a717e3
commit
cb7904ef81
1 changed files with 17 additions and 4 deletions
|
@ -417,9 +417,9 @@ export class UtilityPlugin extends ZeppelinPlugin<IBasePluginConfig, IUtilityPlu
|
||||||
name: "User information",
|
name: "User information",
|
||||||
value:
|
value:
|
||||||
trimLines(`
|
trimLines(`
|
||||||
ID: ${user.id}
|
ID: **${user.id}**
|
||||||
Profile: <@!${user.id}>
|
Profile: <@!${user.id}>
|
||||||
Created: ${accountAge} ago (${createdAt.format("YYYY-MM-DD[T]HH:mm:ss")})
|
Created: **${accountAge} ago (${createdAt.format("YYYY-MM-DD[T]HH:mm:ss")})**
|
||||||
`) + embedPadding,
|
`) + embedPadding,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -439,10 +439,23 @@ export class UtilityPlugin extends ZeppelinPlugin<IBasePluginConfig, IUtilityPlu
|
||||||
name: "Member information",
|
name: "Member information",
|
||||||
value:
|
value:
|
||||||
trimLines(`
|
trimLines(`
|
||||||
Joined: ${joinAge} ago (${joinedAt.format("YYYY-MM-DD[T]HH:mm:ss")})
|
Joined: **${joinAge} ago (${joinedAt.format("YYYY-MM-DD[T]HH:mm:ss")})**
|
||||||
${roles.length > 0 ? "Roles: " + roles.map(r => r.name).join(", ") : ""}
|
${roles.length > 0 ? "Roles: " + roles.map(r => r.name).join(", ") : ""}
|
||||||
`) + embedPadding,
|
`) + embedPadding,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const voiceChannel = member.voiceState.channelID ? this.guild.channels.get(member.voiceState.channelID) : null;
|
||||||
|
if (voiceChannel || member.voiceState.mute || member.voiceState.deaf) {
|
||||||
|
embed.fields.push({
|
||||||
|
name: "Voice information",
|
||||||
|
value:
|
||||||
|
trimLines(`
|
||||||
|
${voiceChannel ? `Current voice channel: **${voiceChannel ? voiceChannel.name : "None"}**` : ""}
|
||||||
|
${member.voiceState.mute ? "Server voice muted: **Yes**" : ""}
|
||||||
|
${member.voiceState.deaf ? "Server voice deafened: **Yes**" : ""}
|
||||||
|
`) + embedPadding,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const cases = (await this.cases.getByUserId(args.userId)).filter(c => !c.is_hidden);
|
const cases = (await this.cases.getByUserId(args.userId)).filter(c => !c.is_hidden);
|
||||||
|
@ -461,7 +474,7 @@ export class UtilityPlugin extends ZeppelinPlugin<IBasePluginConfig, IUtilityPlu
|
||||||
embed.fields.push({
|
embed.fields.push({
|
||||||
name: "Cases",
|
name: "Cases",
|
||||||
value: trimLines(`
|
value: trimLines(`
|
||||||
Total cases: ${cases.length}
|
Total cases: **${cases.length}**
|
||||||
${summaryText}: ${caseSummary.join(", ")}
|
${summaryText}: ${caseSummary.join(", ")}
|
||||||
`),
|
`),
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue