@alemonjs/discord 2.1.10 → 2.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/config.d.ts +1 -1
- package/lib/config.js +7 -2
- package/package.json +2 -2
package/lib/config.d.ts
CHANGED
|
@@ -12,4 +12,4 @@ export declare const platform = "discord";
|
|
|
12
12
|
export declare const getDiscordConfig: () => Options & {
|
|
13
13
|
[key: string]: any;
|
|
14
14
|
};
|
|
15
|
-
export declare const getMaster: (UserId: string) => boolean;
|
|
15
|
+
export declare const getMaster: (UserId: string) => readonly [boolean, string];
|
package/lib/config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isMaster, getConfigValue } from 'alemonjs';
|
|
1
|
+
import { isMaster, createUserHashKey, getConfigValue } from 'alemonjs';
|
|
2
2
|
|
|
3
3
|
const platform = 'discord';
|
|
4
4
|
const getDiscordConfig = () => {
|
|
@@ -7,7 +7,12 @@ const getDiscordConfig = () => {
|
|
|
7
7
|
return config;
|
|
8
8
|
};
|
|
9
9
|
const getMaster = (UserId) => {
|
|
10
|
-
|
|
10
|
+
const isMasterUser = isMaster(UserId, platform);
|
|
11
|
+
const UserKey = createUserHashKey({
|
|
12
|
+
Platform: platform,
|
|
13
|
+
UserId
|
|
14
|
+
});
|
|
15
|
+
return [isMasterUser, UserKey];
|
|
11
16
|
};
|
|
12
17
|
|
|
13
18
|
export { getDiscordConfig, getMaster, platform };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alemonjs/discord",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.11",
|
|
4
4
|
"description": "discord platform connection",
|
|
5
5
|
"author": "lemonade",
|
|
6
6
|
"license": "MIT",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"type": "git",
|
|
66
66
|
"url": "https://github.com/lemonade-lab/alemonjs.git"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "8cee61f217e7e72eebc4342513e32232da05167a"
|
|
69
69
|
}
|