We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce872c9 commit 81e54edCopy full SHA for 81e54ed
1 file changed
src/structures/constants/priority.js
@@ -0,0 +1,22 @@
1
+import * as api from 'src/utils/4.api.js';
2
+import Constant from './constant.js';
3
+
4
+export default class Priority extends Constant {
5
+ static FIRST = new Priority('first', 'top');
6
+ static HIGHEST = new Priority('highest');
7
+ static HIGH = new Priority('high');
8
+ static NORMAL = new Priority('normal');
9
+ static LOW = new Priority('low');
10
+ static LOWEST = new Priority('lowest');
11
+ static LAST = new Priority('last', 'bottom');
12
13
+ static get(value) {
14
+ if (value instanceof Priority) return value;
15
+ // eslint-disable-next-line no-use-before-define
16
+ return values.find((v) => v.equals(value));
17
+ }
18
+}
19
20
+const values = Object.values(Priority);
21
22
+api.mod.priorities = Object.fromEntries(Object.entries(Priority));
0 commit comments