Fixed formatting for event files
This commit is contained in:
@@ -17,64 +17,45 @@ export = {
|
||||
|
||||
if (oldChannel === null && newChannel !== null) {
|
||||
logToChannel("bot", {
|
||||
embeds: [
|
||||
{
|
||||
title: "Voice Channel Join",
|
||||
description:
|
||||
userMention(newState.member!.id) +
|
||||
" joined " +
|
||||
channelMention(newChannel.id),
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: "ID: " + newState.member!.id,
|
||||
icon_url:
|
||||
newState.member!.user.avatarURL() || undefined
|
||||
},
|
||||
timestamp: new Date().toISOString()
|
||||
}
|
||||
]
|
||||
embeds: [{
|
||||
title: "Voice Channel Join",
|
||||
description: userMention(newState.member!.id) + " joined " + channelMention(newChannel.id),
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: "ID: " + newState.member!.id,
|
||||
icon_url: newState.member!.user.avatarURL() || undefined
|
||||
},
|
||||
timestamp: new Date().toISOString()
|
||||
}]
|
||||
})
|
||||
} else if (oldChannel !== null && newChannel === null) {
|
||||
logToChannel("bot", {
|
||||
embeds: [
|
||||
{
|
||||
title: "Voice Channel Leave",
|
||||
description:
|
||||
userMention(oldState.member!.id) +
|
||||
" left " +
|
||||
channelMention(oldChannel.id),
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: "ID: " + oldState.member!.id,
|
||||
icon_url:
|
||||
oldState.member!.user.avatarURL() || undefined
|
||||
},
|
||||
timestamp: new Date().toISOString()
|
||||
}
|
||||
]
|
||||
embeds: [{
|
||||
title: "Voice Channel Leave",
|
||||
description: userMention(oldState.member!.id) + " left " + channelMention(oldChannel.id),
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: "ID: " + oldState.member!.id,
|
||||
icon_url: oldState.member!.user.avatarURL() || undefined
|
||||
},
|
||||
timestamp: new Date().toISOString()
|
||||
}]
|
||||
})
|
||||
} else if (oldChannel !== null && newChannel !== null) {
|
||||
if (oldChannel.id === newChannel.id) return
|
||||
|
||||
logToChannel("bot", {
|
||||
embeds: [
|
||||
{
|
||||
title: "Voice Channel Switch",
|
||||
description:
|
||||
userMention(oldState.member!.id) +
|
||||
" switched from " +
|
||||
channelMention(oldChannel.id) +
|
||||
" to " +
|
||||
channelMention(newChannel.id),
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: "ID: " + oldState.member!.id,
|
||||
icon_url:
|
||||
oldState.member!.user.avatarURL() || undefined
|
||||
},
|
||||
timestamp: new Date().toISOString()
|
||||
}
|
||||
]
|
||||
embeds: [{
|
||||
title: "Voice Channel Switch",
|
||||
description: userMention(oldState.member!.id) + " switched from " + channelMention(oldChannel.id) +
|
||||
" to " + channelMention(newChannel.id),
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: "ID: " + oldState.member!.id,
|
||||
icon_url: oldState.member!.user.avatarURL() || undefined
|
||||
},
|
||||
timestamp: new Date().toISOString()
|
||||
}]
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user