200 lines
3.9 KiB
TypeScript
200 lines
3.9 KiB
TypeScript
import { Snowflake } from 'discord.js';
|
|
import { InfractionType, SettingAction } from './Client.js';
|
|
|
|
export type UserSettings = {
|
|
prefix?: string,
|
|
locale?: string
|
|
}
|
|
|
|
export type Setting = {
|
|
[key: string]: any
|
|
enabled: boolean
|
|
}
|
|
|
|
export type TextCommandsSettings = {
|
|
prefix: string,
|
|
} & Setting
|
|
|
|
export type FilterSetting = {
|
|
bypass: string[],
|
|
whitelist: string[],
|
|
ignore: string[],
|
|
silent: boolean,
|
|
actions: SettingAction[]
|
|
} & Setting
|
|
|
|
export type WordFilterSettings = {
|
|
explicit: string[],
|
|
fuzzy: string[],
|
|
regex: string[],
|
|
} & FilterSetting
|
|
|
|
export type ModerationSettings = {
|
|
channel: Snowflake | null,
|
|
infractions: InfractionType[],
|
|
anonymous: boolean,
|
|
enabled: boolean
|
|
}
|
|
|
|
export type DMInfractionSettings = {
|
|
anonymous: boolean,
|
|
infractions: InfractionType[],
|
|
messages: {
|
|
[key: string]: string
|
|
}
|
|
} & Setting
|
|
|
|
export type ProtectionType = 'position' | 'role'
|
|
export type ProtectionSettings = {
|
|
type: ProtectionType,
|
|
roles: Snowflake[]
|
|
} & Setting
|
|
|
|
export type ModerationPointsSettings = {
|
|
points: { [key in InfractionType]: number },
|
|
expirations: { [key in InfractionType]: number },
|
|
associations: { [key: string]: number },
|
|
multiplier: boolean
|
|
} & Setting
|
|
|
|
export type AutomodSettings = {
|
|
usePrevious: boolean;
|
|
thresholds: {
|
|
[key: number]: {
|
|
type?: InfractionType,
|
|
length?: number
|
|
}
|
|
},
|
|
} & Setting
|
|
|
|
export type PermissionType = 'discord' | 'grant' | 'both';
|
|
export type PermissionSettings = {
|
|
type: PermissionType
|
|
}
|
|
|
|
export type GrantableSettings = {
|
|
roles: Snowflake[]
|
|
} & Setting
|
|
|
|
// export type MuteType = 1 | 2 | 3;
|
|
export enum MuteType {
|
|
Add = 0,
|
|
Replace = 1,
|
|
Remove = 2,
|
|
Timeout = 3
|
|
}
|
|
export type MuteSettings = {
|
|
[key: string]: any// MuteType | Snowflake | number | boolean | null
|
|
type: MuteType,
|
|
role: Snowflake | null,
|
|
permanent: boolean,
|
|
default: number,
|
|
}
|
|
|
|
export type SilenceSettings = {
|
|
//
|
|
} & Setting
|
|
|
|
export type IgnoreSettings = {
|
|
[key: string]: Snowflake[]
|
|
channels: Snowflake[],
|
|
bypass: Snowflake[]
|
|
}
|
|
|
|
export type CommandSettings = {
|
|
disabled: string[],
|
|
custom: object
|
|
}
|
|
|
|
export type IndexingSettings = {
|
|
description: string | null
|
|
} & Setting
|
|
|
|
export type ErrorLogSettings = {
|
|
types: string[]
|
|
channel: string | null
|
|
}
|
|
|
|
export type MessagesSettings = {
|
|
channel: string | null,
|
|
bypass: string[],
|
|
ignore: string[],
|
|
attachments: boolean,
|
|
webhook: string | null,
|
|
} & Setting
|
|
|
|
export type StaffSettings = {
|
|
role: string | null,
|
|
rule: string | null
|
|
} & Setting
|
|
|
|
export type VoiceSettings = {
|
|
channel: string | null
|
|
} & Setting
|
|
|
|
export type SelfroleSettings = {
|
|
text: string | null,
|
|
roles: string[],
|
|
message: string | null,
|
|
channel: string | null,
|
|
}
|
|
|
|
export type MemberLogSettings = {
|
|
channel: string | null,
|
|
join: string | null,
|
|
leave: string | null
|
|
} & Setting
|
|
|
|
export type NicknameLogSettings = {
|
|
channel: string | null
|
|
} & Setting
|
|
|
|
export type StickyRoleSettings = {
|
|
roles: string[]
|
|
} & Setting
|
|
|
|
export type AutoroleSettings = {
|
|
roles: string[]
|
|
} & Setting
|
|
|
|
export type WelcomerSettings = {
|
|
message: string | null
|
|
} & Setting
|
|
|
|
export type WordWatcherSettings = {
|
|
[key: string]: any// SettingAction[] | string[] | string | null
|
|
words: string[],
|
|
regex: string[],
|
|
bypass: string[],
|
|
ignore: string[],
|
|
channel: string | null,
|
|
actions: SettingAction[]
|
|
}
|
|
|
|
export type LinkfilterSettings = {
|
|
blacklist: string[],
|
|
greylist: string[]
|
|
whitelistMode: boolean,
|
|
} & FilterSetting
|
|
|
|
export type InviteFilterSettings = {
|
|
//
|
|
} & FilterSetting
|
|
|
|
export type MentionFilterSettings = {
|
|
unique: boolean,
|
|
limit: number
|
|
} & FilterSetting
|
|
|
|
export type LocaleSettings = {
|
|
language: string
|
|
}
|
|
|
|
export type RaidprotectionSettings = {
|
|
//
|
|
} & Setting
|
|
|
|
export type RejoinSettings = {
|
|
channel: string | null,
|
|
message: string | null
|
|
} & Setting |