Execution: Don't execute the summon command if bot is writing already
fixes #14
This commit is contained in:
parent
b6eb476162
commit
29318592b0
1 changed files with 17 additions and 0 deletions
|
@ -177,6 +177,23 @@ 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) {
|
||||||
|
requestReply(
|
||||||
|
request as RequestMessage,
|
||||||
|
{
|
||||||
|
embeds: [{
|
||||||
|
color: 0xb000ff,
|
||||||
|
description: "I'm already typing here, please wait!",
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
ephemeral: true,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const userLimit = await getUserLimit(getAuthor(request), request.createdAt);
|
const userLimit = await getUserLimit(getAuthor(request), request.createdAt);
|
||||||
|
|
||||||
if (userLimit !== false && userLimit.remaining <= 0) {
|
if (userLimit !== false && userLimit.remaining <= 0) {
|
||||||
|
|
Loading…
Reference in a new issue