1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-09-29 08:20:59 -04:00

Mop typings and tweak few things.

This commit is contained in:
AnxietyisReal 2023-05-20 17:17:23 +10:00
parent 776cd9b03b
commit 9d40e3307e
4 changed files with 127 additions and 132 deletions

View File

@ -81,7 +81,7 @@ export default class TClient extends Client {
this.punishments = new punishments(this);
this.bannedWords = new bannedWords(this);
this.MPServer = new MPServer(this);
this.MPServerCache = {players: [], status: null, name: undefined} as MPServerCache;
this.MPServerCache = {players: [], status: null, name: null} as MPServerCache;
this.suggestion = new suggestion(this);
this.repeatedMessages = {};
this.setMaxListeners(20);

View File

@ -4,7 +4,7 @@ export default {
run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
interaction.reply({embeds: [new client.embed().setColor(client.config.embedColor).setTitle('Daggerbot contributors').setDescription([
'**Thanks to those below that contributed to/developed the bot!**',
client.config.whitelist.map(id=>{const member = interaction.guild.members.cache.get(id); return `${member?.user?.username ?? 'N/A'} <@${id}>`}).join('\n')
client.config.contribList.map(id=>{const member = interaction.guild.members.cache.get(id); return `${member?.user?.username ?? 'N/A'} <@${id}>`}).join('\n')
].join('\n'))]})
},
data: new SlashCommandBuilder()

View File

@ -39,6 +39,14 @@
"141304507249197057",
"309373272594579456"
],
"contribList": [
"190407856527376384",
"615761944154210305",
"633345781780185099",
"215497515934416896",
"141304507249197057",
"178941218510602240"
],
"mainServer": {
"id": "468835415093411861",
"staffRoles": [

View File

@ -28,14 +28,8 @@ export interface Punishment {
cancels?: number;
duration?: number;
}
export interface DSS_serverName {
data: FSData
}
export interface FSData {
server: FSServer,
slots: FSslots
}
export interface FSServer {
server: {
dayTime: number,
game: string,
mapName: string,
@ -45,12 +39,13 @@ export interface FSServer {
name: string,
server: string,
version: string
}
export interface FSslots {
},
slots: {
capacity: number,
used: number,
players: Array<FSPlayer>
}
}
export interface FSPlayer {
isUsed: boolean,
isAdmin: boolean,
@ -58,11 +53,7 @@ export interface FSPlayer {
name: string
}
export interface FSCareerSavegame {
settings: FSCareerSavegameSettings,
statistics: FSCareerSavegameStatistics,
slotSystem: FSCareerSavegameSlotSystem
}
export interface FSCareerSavegameSettings {
settings: {
savegameName: XMLText,
creationDate: XMLText,
mapId: XMLText,
@ -107,17 +98,17 @@ export interface FSCareerSavegameSettings {
dirtInterval: XMLText,
timeScale: XMLText,
autoSaveInterval: XMLText
}
export interface FSCareerSavegameStatistics {
},
statistics: {
money: XMLText,
playTime: XMLText
}
export interface FSCareerSavegameSlotSystem {
_attributes: slotUsage
}
interface slotUsage {
},
slotSystem: {
_attributes: {
slotUsage: string
}
}
}
interface XMLText {
_text: string
}
@ -141,23 +132,11 @@ export interface Config {
embedColorXmas: Discord.ColorResolvable,
LRSstart: number,
whitelistedServers: Array<string>,
MPStatsLocation: MPStatsLocation,
botSwitches: botSwitches,
botPresence: Discord.PresenceData,
eval: boolean,
whitelist: Array<string>
mainServer: mainServer
}
export interface MPServerCache {
players: FSPlayer[],
status: 'online' | 'offline' | null,
name: string | undefined
}
interface MPStatsLocation {
MPStatsLocation: {
channel: string,
message: string
}
interface botSwitches {
},
botSwitches: {
registerCommands: boolean,
commands: boolean,
logs: boolean,
@ -165,14 +144,15 @@ interface botSwitches {
automod: boolean,
mpstats: boolean,
autores: boolean
}
interface mainServer {
},
botPresence: Discord.PresenceData,
eval: boolean,
whitelist: Array<string>,
contribList: Array<string>,
mainServer: {
id: string,
staffRoles: Array<string>,
roles: mainServerRoles,
channels: mainServerChannels
}
interface mainServerRoles {
roles: {
admin: string,
bottech: string,
dcmod: string,
@ -184,8 +164,8 @@ interface mainServerRoles {
mphelper: string,
mpplayer: string,
vtcmember: string
}
interface mainServerChannels {
},
channels: {
console: string,
errors: string,
thismeanswar: string,
@ -197,3 +177,10 @@ interface mainServerChannels {
fs_server_log: string,
punishment_log: string
}
}
}
export interface MPServerCache {
players: FSPlayer[],
status: 'online' | 'offline' | null,
name: string | null
}