Display username in message log
This commit is contained in:
parent
eda92cd83a
commit
2897d000cc
1 changed files with 12 additions and 7 deletions
|
@ -31,17 +31,22 @@ client.on('packet', async (packet) => {
|
||||||
const attachFullMessage = oldMsg.length > 800 || newMsg.length > 800;
|
const attachFullMessage = oldMsg.length > 800 || newMsg.length > 800;
|
||||||
let embed: LogMessage = {
|
let embed: LogMessage = {
|
||||||
title: `Message edited in ${server.name}`,
|
title: `Message edited in ${server.name}`,
|
||||||
description: `[\\[#${channel.name}\\]](/server/${server._id}/channel/${channel._id}) | `
|
description:
|
||||||
+ `[\\[Author\\]](/@${m?.author_id}) | `
|
`[#${channel.name}](/server/${server._id}/channel/${channel._id}) | ` +
|
||||||
+ `[\\[Jump to message\\]](/server/${server._id}/channel/${channel._id}/${packet.id})`,
|
`[@${sanitizeMessageContent(
|
||||||
|
m?.author?.username ?? "Unknown User"
|
||||||
|
)}](/@${m?.author_id}) | ` +
|
||||||
|
`[Jump to message](/server/${server._id}/channel/${channel._id}/${packet.id})`,
|
||||||
fields: [],
|
fields: [],
|
||||||
color: '#829dff',
|
color: "#829dff",
|
||||||
overrides: {
|
overrides: {
|
||||||
discord: {
|
discord: {
|
||||||
description: `Author: @${m?.author?.username || m?.author_id || "Unknown"} | Channel: ${channel?.name || channel?._id}`
|
description: `Author: @${
|
||||||
|
m?.author?.username || m?.author_id || "Unknown"
|
||||||
|
} | Channel: ${channel?.name || channel?._id}`,
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
|
|
||||||
if (attachFullMessage) {
|
if (attachFullMessage) {
|
||||||
embed.attachments = [
|
embed.attachments = [
|
||||||
|
|
Loading…
Reference in a new issue