23 lines
497 B
TypeScript
23 lines
497 B
TypeScript
// 公会权限
|
|
import { readJsonFile, parseNumberList } from '../util'
|
|
import { FILENAME } from '../../consts'
|
|
|
|
export interface DicGuildAuth {
|
|
|
|
// id
|
|
readonly id: number;
|
|
// 权限
|
|
readonly authority: number[];
|
|
|
|
}
|
|
|
|
const str = readJsonFile(FILENAME.DIC_GUILD_AUTH);
|
|
let arr = JSON.parse(str);
|
|
|
|
export const dicGuildAuth = new Map<number, number[]>();
|
|
|
|
arr.forEach(o => {
|
|
let authority = parseNumberList(o.authority)
|
|
dicGuildAuth.set(o.id, authority);
|
|
});
|
|
arr = undefined; |