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:
parent
8cf15cc231
commit
4067eac730
@ -8,7 +8,7 @@ import punishments from './models/punishments.js';
|
|||||||
import tags from './models/tagSystem.js';
|
import tags from './models/tagSystem.js';
|
||||||
import bonkCount from './models/bonkCount.js';
|
import bonkCount from './models/bonkCount.js';
|
||||||
import MPServer from './models/MPServer.js';
|
import MPServer from './models/MPServer.js';
|
||||||
import DatabaseServer from './DatabaseServer.js';
|
import DatabaseServer from './funcs/DatabaseServer.js';
|
||||||
import xjs from 'xml-js';
|
import xjs from 'xml-js';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
const tokens = JSON.parse(readFileSync('src/tokens.json', 'utf8'));
|
const tokens = JSON.parse(readFileSync('src/tokens.json', 'utf8'));
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import TClient from './client';
|
import TClient from '../client';
|
||||||
import mongoose from 'mongoose';
|
import mongoose from 'mongoose';
|
||||||
|
|
||||||
export default async(client:TClient)=>{
|
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('disconnecting', ()=>console.log(client.logTime(), `${LogPrefix} Disconnecting from MongoDB`))
|
||||||
.on('disconnected', ()=>console.log(client.logTime(), `${LogPrefix} Disconnected 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('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('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('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}`)));
|
.on('error', ((err:mongoose.Error)=>console.error(client.logTime(), `${LogPrefix} Encountered an error in MongoDB: ${err.message}`)));
|
@ -1,7 +1,7 @@
|
|||||||
import Discord from 'discord.js';
|
import Discord from 'discord.js';
|
||||||
import TClient from './client';
|
import TClient from '../client';
|
||||||
import {writeFileSync, readFileSync} from 'node:fs';
|
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)=>{
|
export default async(client:TClient, Channel:string, Message:string, Server:TServer, ServerName:string)=>{
|
||||||
let MPLoopPrefix = '[MPLoop] ';
|
let MPLoopPrefix = '[MPLoop] ';
|
@ -2,7 +2,7 @@ import Discord from 'discord.js';
|
|||||||
import TClient from './client.js';
|
import TClient from './client.js';
|
||||||
const client = new TClient;
|
const client = new TClient;
|
||||||
client.init();
|
client.init();
|
||||||
import MPLoop from './MPLoop.js';
|
import MPLoop from './funcs/MPLoop.js';
|
||||||
import {Player} from 'discord-player';
|
import {Player} from 'discord-player';
|
||||||
const player = Player.singleton(client);
|
const player = Player.singleton(client);
|
||||||
import {writeFileSync, readFileSync} from 'node:fs';
|
import {writeFileSync, readFileSync} from 'node:fs';
|
||||||
|
@ -15,5 +15,5 @@
|
|||||||
"typeRoots": [ "./src/typings" ],
|
"typeRoots": [ "./src/typings" ],
|
||||||
},
|
},
|
||||||
"include": [ "src/" ],
|
"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" ]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user