mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-12-29 05:35:38 -05:00
Stressful test complete, migrating to Windows host
This commit is contained in:
parent
067a9cd65f
commit
fe81f12746
2
botStartup.bat
Normal file
2
botStartup.bat
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
@echo off
|
||||||
|
pm2 start src/index.ts --name Daggerbot -i 1
|
@ -3,17 +3,17 @@ import { TClient } from 'src/client';
|
|||||||
import * as util from 'node:util';
|
import * as util from 'node:util';
|
||||||
const removeUsername = (text: string)=>{
|
const removeUsername = (text: string)=>{
|
||||||
let matchesLeft = true;
|
let matchesLeft = true;
|
||||||
const array = text.split('\/');
|
const array = text.split('\\');
|
||||||
while (matchesLeft){
|
while (matchesLeft){
|
||||||
let usersIndex = array.indexOf('home');
|
let usersIndex = array.indexOf('Users');
|
||||||
if (usersIndex<1) matchesLeft = false;
|
if (usersIndex<1) matchesLeft = false;
|
||||||
else {
|
else {
|
||||||
let usernameIndex = usersIndex+1;
|
let usernameIndex = usersIndex+1;
|
||||||
if(array[usernameIndex].length == 0) usernameIndex += 1;
|
if(array[usernameIndex].length == 0) usernameIndex += 1;
|
||||||
array[usernameIndex] = '*'.repeat(array[usernameIndex].length);
|
array[usernameIndex] = '*'.repeat(array[usernameIndex].length);
|
||||||
array[usersIndex] = 'ho\u200bme';
|
array[usersIndex] = 'Us\u200bers';
|
||||||
}
|
}
|
||||||
} return array.join('\/');
|
} return array.join('\\');
|
||||||
};
|
};
|
||||||
export default {
|
export default {
|
||||||
async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>) {
|
async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>) {
|
||||||
|
@ -64,4 +64,6 @@ export class Database {
|
|||||||
console.log(this._path + ' "Database saved" Notifications disabled');
|
console.log(this._path + ' "Database saved" Notifications disabled');
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} // Nice.
|
} // Nice.
|
Loading…
Reference in New Issue
Block a user