mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
- 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:
16
src/NadekoBot/Common/Linq2DbExpressions.cs
Normal file
16
src/NadekoBot/Common/Linq2DbExpressions.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
#nullable disable
|
||||
using LinqToDB;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace NadekoBot.Common;
|
||||
|
||||
public static class Linq2DbExpressions
|
||||
{
|
||||
[ExpressionMethod(nameof(GuildOnShardExpression))]
|
||||
public static bool GuildOnShard(ulong guildId, int totalShards, int shardId)
|
||||
=> throw new NotSupportedException();
|
||||
|
||||
private static Expression<Func<ulong, int, int, bool>> GuildOnShardExpression()
|
||||
=> (guildId, totalShards, shardId)
|
||||
=> guildId / 4194304 % (ulong)totalShards == (ulong)shardId;
|
||||
}
|
@@ -16,7 +16,7 @@ public abstract class NadekoInteraction
|
||||
protected readonly TaskCompletionSource<bool> _interactionCompletedSource;
|
||||
|
||||
protected ulong _authorId;
|
||||
protected IUserMessage message;
|
||||
protected IUserMessage message = null!;
|
||||
|
||||
protected NadekoInteraction(DiscordSocketClient client, ulong authorId, Func<SocketMessageComponent, Task> onAction)
|
||||
{
|
||||
|
Reference in New Issue
Block a user