Removed discrim from the database

Added .translateflags command
Added captcha to timely, configurable in .conf gambling
Changed bonuses for patreon rewards
Fixed nunchi message color
This commit is contained in:
Toastie 2024-11-03 23:50:08 +13:00
parent 41f1c7aa11
commit d1bc423b99
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4
29 changed files with 12080 additions and 4732 deletions
src/EllieBot/Services/GrpcApi

View file

@ -28,6 +28,8 @@ public class XpSvc : GrpcXp.GrpcXpBase, IGrpcSvc, IEService
GetXpSettingsRequest request,
ServerCallContext context)
{
await Task.Yield();
var guild = _client.GetGuild(request.GuildId);
if (guild is null)
@ -54,6 +56,26 @@ public class XpSvc : GrpcXp.GrpcXpBase, IGrpcSvc, IEService
Name = guild.GetRole(x)?.Name ?? "????"
})));
var curRews = _xp.GetCurrencyRewards(request.GuildId);
var roleRews = _xp.GetRoleRewards(request.GuildId);
var rews = curRews.Select(x => new RewItemReply()
{
Level = x.Level,
Type = "Currency",
Value = x.Amount.ToString()
});
rews = rews.Concat(roleRews.Select(x => new RewItemReply()
{
Level = x.Level,
Type = "Role",
Value = guild.GetRole(x.RoleId)?.ToString() ?? x.RoleId.ToString()
}))
.OrderBy(x => x.Level);
reply.Rewards.AddRange(rews);
reply.ServerExcluded = isServerExcluded;
return reply;