added special discord error message for not equipped builds
This commit is contained in:
parent
ab9b2b2f5b
commit
ecaedcf9f3
1 changed files with 5 additions and 2 deletions
|
@ -439,7 +439,7 @@ namespace Lieb.Data
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsRaidSignUpAllowed(ulong liebUserId, int raidId, out string errorMessage, bool ignoreRole = false)
|
public bool IsRaidSignUpAllowed(ulong liebUserId, int raidId, out string errorMessage, bool ignoreRole = false, bool discordErrorMessage = false)
|
||||||
{
|
{
|
||||||
errorMessage = string.Empty;
|
errorMessage = string.Empty;
|
||||||
using var context = _contextFactory.CreateDbContext();
|
using var context = _contextFactory.CreateDbContext();
|
||||||
|
@ -473,6 +473,9 @@ namespace Lieb.Data
|
||||||
|
|
||||||
if (raid.RaidType != RaidType.Planned && !user.GuildWars2Accounts.Where(a => a.EquippedBuilds.Where(b => b.GuildWars2Build.UseInRandomRaid).Count() > 0).Any())
|
if (raid.RaidType != RaidType.Planned && !user.GuildWars2Accounts.Where(a => a.EquippedBuilds.Where(b => b.GuildWars2Build.UseInRandomRaid).Count() > 0).Any())
|
||||||
{
|
{
|
||||||
|
if(discordErrorMessage)
|
||||||
|
errorMessage = "No equipped Guild Wars 2 build found. Please add your builds at https://lieb.games";
|
||||||
|
else
|
||||||
errorMessage = "No equipped Guild Wars 2 build found.";
|
errorMessage = "No equipped Guild Wars 2 build found.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue