mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 21:14:31 +00:00
chore: Enable more lint rules, disable some that trigger a lot. Will clean up later.
This commit is contained in:
@@ -10,7 +10,7 @@ import { normalizeDiscordToken } from "./token.js";
|
||||
|
||||
const PERMISSION_ENTRIES = Object.entries(PermissionFlagsBits).filter(
|
||||
([, value]) => typeof value === "bigint",
|
||||
) as Array<[string, bigint]>;
|
||||
);
|
||||
|
||||
type DiscordClientOpts = {
|
||||
token?: string;
|
||||
@@ -60,7 +60,7 @@ function removePermissionBits(base: bigint, deny?: string) {
|
||||
function bitfieldToPermissions(bitfield: bigint) {
|
||||
return PERMISSION_ENTRIES.filter(([, value]) => (bitfield & value) === value)
|
||||
.map(([name]) => name)
|
||||
.sort();
|
||||
.toSorted();
|
||||
}
|
||||
|
||||
export function isThreadChannelType(channelType?: number) {
|
||||
|
||||
Reference in New Issue
Block a user