Polarcraft/webv2/types/global.d.ts
Xeovalyte 0588dd1c45
Some checks failed
Build and Deploy / Deploy Web (push) Failing after 1s
Build and Deploy / Deploy Discord Bot (push) Failing after 0s
feat: Added set default functions and refresh discord data
2023-06-15 16:55:23 +02:00

63 lines
1.1 KiB
TypeScript

import { Document, Types } from 'mongoose'
export {}
declare global {
interface IUser extends Document {
_id: Types.ObjectId,
username: string,
usernameType: string,
discord: {
id: string,
username: string,
avatarHash: string
},
minecraft?: {
uuid: string,
username: string
},
teamInvites: Types.ObjectId[],
role: {
admin: boolean,
moderator: boolean,
},
team?: ITeam,
accessToken?: string
}
interface IWhitelist {
_id: types.ObjectId,
uuid: string,
connected: boolean,
code: string
}
interface ITeam {
_id: types.ObjectId,
name: string,
color: string,
members: string[],
textChannelId: string,
voiceChannelId: string
}
type DiscordUser = {
id: string,
username: string,
discriminator: string,
global_name: string,
avatar: string,
bot?: boolean,
system?: boolean,
mfa_enabled?: boolean,
banner?: string,
accent_color?: number,
locale?: string,
verified?: boolean,
email?: string,
flags?: number,
premium_type?: number,
public_flags?: number
}
}