Fixed formatting for event files

This commit is contained in:
2024-01-20 20:56:08 +01:00
parent 5ce69eced3
commit 1ffcaf602d
7 changed files with 94 additions and 163 deletions

View File

@@ -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()
}]
})
}
}