Fixed botgen failing

This commit is contained in:
Dev 2024-10-18 19:10:28 +01:00
parent 672b1f1dd5
commit 9ab0b40854

View File

@ -177,7 +177,7 @@ export class BotHelper {
*/
public getPmcNicknameOfMaxLength(maxLength: number, side?: string): string {
const randomType = side ? side : this.randomUtil.getInt(0, 1) === 0 ? "usec" : "bear";
const allNames = this.databaseService.getBots().types[randomType].firstName;
const allNames = this.databaseService.getBots().types[randomType.toLowerCase()].firstName;
const filteredNames = allNames.filter((name) => name.length <= maxLength);
if (filteredNames.length === 0) {
this.logger.warning(