From 41025295544ee7fbad02b16d1762b71f66ca5d18 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Wed, 28 Dec 2022 11:38:08 +1100 Subject: [PATCH] Stressful test complete, migrating to Windows host --- botStartup.bat | 2 ++ src/commands/eval.ts | 8 ++++---- src/database.ts | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 botStartup.bat diff --git a/botStartup.bat b/botStartup.bat new file mode 100644 index 0000000..abc8b20 --- /dev/null +++ b/botStartup.bat @@ -0,0 +1,2 @@ +@echo off +pm2 start src/index.ts --name Daggerbot -i 1 \ No newline at end of file diff --git a/src/commands/eval.ts b/src/commands/eval.ts index 29f7206..a25904f 100644 --- a/src/commands/eval.ts +++ b/src/commands/eval.ts @@ -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'>) { diff --git a/src/database.ts b/src/database.ts index fafadae..3745f25 100644 --- a/src/database.ts +++ b/src/database.ts @@ -64,4 +64,6 @@ export class Database { console.log(this._path + ' "Database saved" Notifications disabled'); return this; } + + } // Nice. \ No newline at end of file