Skip to content

Commit

Permalink
feat: add queue_imbalance error (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skelmis authored Feb 8, 2023
1 parent cd1e4c8 commit f4027c0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
17 changes: 16 additions & 1 deletion docs/errors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { DiscordInlineCode } from '@skyra/discord-components-react';
| 17 | SUGGESTION_RESOLUTION_ERROR | [click](#suggestion-resolution-error) |
| 18 | MISSING_SEND_PERMISSIONS_IN_SUGGESTION_CHANNEL | [click](#missing-send-permissions-in-suggestions-channel) |
| 19 | MISSING_THREAD_CREATE_PERMISSIONS | [click](#missing-thread-create-permissions) |
| 20 | QUEUE_IMBALANCE | [click](#queue-imbalance) |

## Error Information

Expand Down Expand Up @@ -225,4 +226,18 @@ This error is thrown when the bot cannot create threads in your suggestions chan
Alternatively, ask your administrator to disable automatic thread creation using <DiscordInlineCode>/config thread disable</DiscordInlineCode>
</>
}
code={19} />
code={19} />

### Queue Imbalance

This error is thrown when you attempt to use a suggestion in a queue which has already been used
in a separate queue.

<ErrorEmbed
title="Queue Imbalance"
description={
<>
This suggestion has already been handled in another queue.
</>
}
code={20} />
3 changes: 2 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export enum ErrorCode {
MISSING_TRANSLATION = 16,
SUGGESTION_RESOLUTION_ERROR = 17,
MISSING_SEND_PERMISSIONS_IN_SUGGESTION_CHANNEL = 18,
MISSING_THREAD_CREATE_PERMISSIONS = 19
MISSING_THREAD_CREATE_PERMISSIONS = 19,
QUEUE_IMBALANCE = 20
}

export type EmbedProps = {
Expand Down

1 comment on commit f4027c0

@vercel
Copy link

@vercel vercel bot commented on f4027c0 Feb 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.