Add current voice channel to thread header
parent
073f3a87ea
commit
3d077cb252
|
@ -176,10 +176,19 @@ async function createNewThreadForUser(user, quiet = false) {
|
||||||
// Guild member info
|
// Guild member info
|
||||||
for (const [guildId, guildData] of userGuildData.entries()) {
|
for (const [guildId, guildData] of userGuildData.entries()) {
|
||||||
const {nickname, joinDate} = getHeaderGuildInfo(guildData.member);
|
const {nickname, joinDate} = getHeaderGuildInfo(guildData.member);
|
||||||
const headerStr = [
|
const headerItems = [
|
||||||
`NICKNAME **${nickname}**`,
|
`NICKNAME **${nickname}**`,
|
||||||
`JOINED **${joinDate}** ago`
|
`JOINED **${joinDate}** ago`
|
||||||
].join(', ');
|
];
|
||||||
|
|
||||||
|
if (guildData.member.voiceState.channelID) {
|
||||||
|
const voiceChannel = guildData.guild.channels.get(guildData.member.voiceState.channelID);
|
||||||
|
if (voiceChannel) {
|
||||||
|
headerItems.push(`VOICE CHANNEL **${voiceChannel.name}**`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const headerStr = headerItems.join(', ');
|
||||||
|
|
||||||
if (mainGuilds.length === 1) {
|
if (mainGuilds.length === 1) {
|
||||||
infoHeader += `\n${headerStr}`;
|
infoHeader += `\n${headerStr}`;
|
||||||
|
|
Loading…
Reference in New Issue