1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 00:10:58 -05:00

Move dedicated files to functions folder

This commit is contained in:
AnxietyisReal 2023-08-27 01:03:14 +10:00
parent 8cf15cc231
commit 4067eac730
5 changed files with 7 additions and 7 deletions

View File

@ -8,7 +8,7 @@ import punishments from './models/punishments.js';
import tags from './models/tagSystem.js';
import bonkCount from './models/bonkCount.js';
import MPServer from './models/MPServer.js';
import DatabaseServer from './DatabaseServer.js';
import DatabaseServer from './funcs/DatabaseServer.js';
import xjs from 'xml-js';
import moment from 'moment';
const tokens = JSON.parse(readFileSync('src/tokens.json', 'utf8'));

View File

@ -1,4 +1,4 @@
import TClient from './client';
import TClient from '../client';
import mongoose from 'mongoose';
export default async(client:TClient)=>{
@ -24,7 +24,7 @@ export default async(client:TClient)=>{
.on('disconnecting', ()=>console.log(client.logTime(), `${LogPrefix} Disconnecting from MongoDB`))
.on('disconnected', ()=>console.log(client.logTime(), `${LogPrefix} Disconnected from MongoDB`))
.on('close', ()=>console.log(client.logTime(), `${LogPrefix} MongoDB has closed the connection`))
.on('reconnected', ()=>console.log(client.logTime(), `${LogPrefix} Re-establishing a connection to MongoDB`))
.on('reconnected', ()=>console.log(client.logTime(), `${LogPrefix} Connection to MongoDB has been re-established`))
.on('all', ()=>console.log(client.logTime(), `${LogPrefix} Successfully established a connection to all members`))
.on('fullsetup', ()=>console.log(client.logTime(), `${LogPrefix} Successfully established a connection to Primary server & atleast one member`))
.on('error', ((err:mongoose.Error)=>console.error(client.logTime(), `${LogPrefix} Encountered an error in MongoDB: ${err.message}`)));

View File

@ -1,7 +1,7 @@
import Discord from 'discord.js';
import TClient from './client';
import TClient from '../client';
import {writeFileSync, readFileSync} from 'node:fs';
import {FSPlayer, FSData, FSCareerSavegame, TServer} from './typings/interfaces';
import {FSPlayer, FSData, FSCareerSavegame, TServer} from '../typings/interfaces';
export default async(client:TClient, Channel:string, Message:string, Server:TServer, ServerName:string)=>{
let MPLoopPrefix = '[MPLoop] ';

View File

@ -2,7 +2,7 @@ import Discord from 'discord.js';
import TClient from './client.js';
const client = new TClient;
client.init();
import MPLoop from './MPLoop.js';
import MPLoop from './funcs/MPLoop.js';
import {Player} from 'discord-player';
const player = Player.singleton(client);
import {writeFileSync, readFileSync} from 'node:fs';

View File

@ -15,5 +15,5 @@
"typeRoots": [ "./src/typings" ],
},
"include": [ "src/" ],
"exclude": [ ".yarn/cache", ".yarn/unplugged",".git", "src/config.json", "src/DB-Beta.config.json", "src/Toast-Testbot.config.json", "src/disabled" ]
"exclude": [ ".yarn/cache", ".yarn/unplugged",".git", "src/config.json", "src/DB-Beta.config.json", "src/Toast-Testbot.config.json" ]
}