1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-09-29 12:30:58 -04:00

Stressful test complete, migrating to Windows host

This commit is contained in:
Toast 2022-12-28 11:38:08 +11:00
parent 067a9cd65f
commit fe81f12746
3 changed files with 8 additions and 4 deletions

2
botStartup.bat Normal file
View File

@ -0,0 +1,2 @@
@echo off
pm2 start src/index.ts --name Daggerbot -i 1

View File

@ -3,17 +3,17 @@ import { TClient } from 'src/client';
import * as util from 'node:util';
const removeUsername = (text: string)=>{
let matchesLeft = true;
const array = text.split('\/');
const array = text.split('\\');
while (matchesLeft){
let usersIndex = array.indexOf('home');
let usersIndex = array.indexOf('Users');
if (usersIndex<1) matchesLeft = false;
else {
let usernameIndex = usersIndex+1;
if(array[usernameIndex].length == 0) usernameIndex += 1;
array[usernameIndex] = '*'.repeat(array[usernameIndex].length);
array[usersIndex] = 'ho\u200bme';
array[usersIndex] = 'Us\u200bers';
}
} return array.join('\/');
} return array.join('\\');
};
export default {
async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>) {

View File

@ -64,4 +64,6 @@ export class Database {
console.log(this._path + ' "Database saved" Notifications disabled');
return this;
}
} // Nice.