- Reaction roles rewritten completely. They now support multiple exclusivity groups per message and level requirements. However they can only be added one by one

- Bot now support much higher XP values for global and server levels
This commit is contained in:
Kwoth
2022-05-04 02:08:15 +02:00
parent 5cb95cf94d
commit 5b5bc278ff
35 changed files with 10820 additions and 715 deletions

View File

@@ -17,7 +17,6 @@ using Image = SixLabors.ImageSharp.Image;
namespace NadekoBot.Modules.Xp.Services;
// todo improve xp with linqtodb
public class XpService : INService, IReadyExecutor, IExecNoCommand
{
public const int XP_REQUIRED_LVL_1 = 36;
@@ -133,7 +132,7 @@ public class XpService : INService, IReadyExecutor, IExecNoCommand
try
{
var toNotify =
new List<(IGuild Guild, IMessageChannel MessageChannel, IUser User, int Level,
new List<(IGuild Guild, IMessageChannel MessageChannel, IUser User, long Level,
XpNotificationLocation NotifyType, NotifOf NotifOf)>();
var roleRewards = new Dictionary<ulong, List<XpRoleReward>>();
var curRewards = new Dictionary<ulong, List<XpCurrencyReward>>();
@@ -640,7 +639,7 @@ public class XpService : INService, IReadyExecutor, IExecNoCommand
{
DiscordUser du;
UserXpStats stats;
int totalXp;
long totalXp;
int globalRank;
int guildRank;
await using (var uow = _db.GetDbContext())