/summon: fix command being canceled wrongly in execution

the problem was that undefined value was compared to number,
making the expression return true
This commit is contained in:
Wroclaw 2023-09-19 20:30:55 +02:00
parent 74fe8e3e8b
commit 46bb5c867d

View file

@ -177,7 +177,7 @@ export async function queueRequest(request: apiRequest) {
if (!canReplyToRequest(request)) return; if (!canReplyToRequest(request)) return;
if (!(request instanceof DiscordApi.Message) && channelsRunning.get(request.channelId)?.length !== 0) { if (!(request instanceof DiscordApi.Message) && channelsRunning.get(request.channelId) && channelsRunning.get(request.channelId)?.length !== 0) {
requestReply( requestReply(
request as RequestMessage, request as RequestMessage,
{ {
@ -190,7 +190,7 @@ export async function queueRequest(request: apiRequest) {
{ {
ephemeral: true, ephemeral: true,
}, },
) ).catch(() => {/*GRACEFAIL: don't do anything*/});
return; return;
} }