execution: log channel ID to terminal if it's unknown
channelId is set for commands executed outside of common guilds no changes for usage logging in database is required
This commit is contained in:
parent
c4edf55f65
commit
1b402c791c
1 changed files with 2 additions and 1 deletions
|
@ -191,7 +191,8 @@ function logUsedTokens(
|
|||
// it doesn't make sense to store usage in database if we don't know where it came from
|
||||
return;
|
||||
}
|
||||
const channelName: string = !message.channel ? "[No channel]"
|
||||
const channelName: string = !message.channelId ? "[No channel]"
|
||||
: !message.channel ? `[Unknown channel: ${message.channelId}]`
|
||||
: !message.channel.isDMBased() ? `#${message.channel.name} (${message.guild?.name})`
|
||||
: `#@${getAuthor(message).tag}`
|
||||
;
|
||||
|
|
Loading…
Reference in a new issue