Fixed HTML Transcripts "member not found" error.

This commit is contained in:
DJj123dj
2025-02-19 15:48:37 +01:00
parent 15eef95fdd
commit 0d40c23aa8
+4 -1
View File
@@ -318,7 +318,10 @@ export class ODTranscriptCollector {
const restMsg = await this.#client.rest.get(discord.Routes.channelMessage(msg.channelId,msg.id)) as discord.APIMessage & {interaction_metadata:{name:string}} const restMsg = await this.#client.rest.get(discord.Routes.channelMessage(msg.channelId,msg.id)) as discord.APIMessage & {interaction_metadata:{name:string}}
const commandName = restMsg.interaction_metadata.name ?? "unknown-command" const commandName = restMsg.interaction_metadata.name ?? "unknown-command"
//slash command reply //slash command reply
const member = await msg.guild.members.fetch(msg.interactionMetadata.user.id) let member: discord.GuildMember|null = null
try{
member = await msg.guild.members.fetch(msg.interactionMetadata.user.id)
}catch{} //member not found (user left the server)
reply = { reply = {
type:"interaction", type:"interaction",
name:commandName, name:commandName,