3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Fix edge case error in ContextCmd

This commit is contained in:
Dragory 2021-02-13 19:53:12 +02:00
parent 05a899fff7
commit 2ac6fedfc5
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -27,8 +27,8 @@ export const ContextCmd = utilityCmd({
return;
}
const channel = args.channel || args.message.channel;
const messageId = args.messageId || args.message.messageId;
const channel = args.channel ?? args.message.channel;
const messageId = args.messageId ?? args.message.messageId;
if (!canReadChannel(channel, msg.member)) {
sendErrorMessage(pluginData, msg.channel, "Message context not found");