modmail/@types/Modmail.d.ts
2024-03-22 22:15:42 +02:00

67 lines
1.3 KiB
TypeScript

import { Guild, GuildMember, Message, User } from 'discord.js';
import { ExtendedMessage } from './Client.js';
export type ModmailReadState = 'unread' | 'read'
export type ModmailEntry = {
attachments?: string[],
author: string,
content?: string,
timestamp: number,
isReply?: boolean,
readState?: ModmailReadState,
anon?: boolean,
msgId?: string
}
export type SpamEntry = {
start: number,
count: number,
timeout: boolean,
warned: boolean
}
export type ModmailLogEntry = {
author: User,
content?: string,
action: string,
target?: User
}
export type ModmailSendOptions = {
target: GuildMember,
staff: GuildMember,
anon: boolean,
content: string
}
export type MomdailSendCannedResponseOptions = {
message: ExtendedMessage<true>,
responseName: string,
anon: boolean
}
export type MomdailSendResponseOptions = {
message: ExtendedMessage<true>,
content: string,
anon: boolean
}
export type ModmailSendModmailOptions = {
message: Mesasge<true>,
content: string,
anon: boolean,
target: User | GuildMember
}
export type ChannelHandlerOptions = {
graveyardInactive: number,
readInactive: number,
channelSweepInterval: number,
modmailCategory: string[]
}
export type ModmailTarget = {
struct: GuildMember,
inAppealServer: boolean
}