Skip to content

Commit

Permalink
improve error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
MineFact committed Jan 28, 2024
1 parent 861bc70 commit 617b35e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/struct/core/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,34 +260,59 @@ export default class Network {
return;

this.buildTeamInfo = await this.getBuildTeamInfoFromDatabase();

if(this.buildTeamInfo.length == 0){
console.log("No Build Teams found in the database. Please add at least one Build Team to it.");
return;
}
}

async loadBuildTeamRegions() {
if(this.buildTeamRegions != null)
return;

this.buildTeamRegions = await this.getBuildTeamRegions();

if(this.buildTeamRegions.length == 0){
console.log("No Build Team Regions found in the database. Please add at least one Build Team Region to it.");
return;
}
}

async loadBuildTeamServers() {
if(this.buildTeamServers != null)
return;

this.buildTeamServers = await this.getBuildTeamServersFromDatabase();

if(this.buildTeamServers.length == 0){
console.log("No Build Team Servers found in the database. Please add at least one Build Team Server to it.");
return;
}
}

async loadBuildTeamWarps() {
if(this.buildTeamWarps != null)
return;

this.buildTeamWarps = await this.getWarpsFromDatabase();

if(this.buildTeamWarps.length == 0){
console.log("No Build Team Warps found in the database. Please add at least one Build Team Warp to it.");
return;
}
}

async loadBuildTeamWarpGroups() {
if(this.buildTeamWarpGroups != null)
return;

this.buildTeamWarpGroups = await this.getWarpGroupsFromDatabase();

if(this.buildTeamWarpGroups.length == 0){
console.log("No Build Team Warp Groups found in the database. Please add at least one Build Team Warp Group to it.");
return;
}
}


Expand Down

0 comments on commit 617b35e

Please sign in to comment.