mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-13 02:38:27 -04:00
add: added .notify with no params showing events with descriptions add: .winlb docs: updated docs dev: updated discord.net, redid migrations
34 lines
847 B
C#
34 lines
847 B
C#
#nullable disable
|
|
using NadekoBot.Db.Models;
|
|
|
|
namespace NadekoBot.Modules.Administration.Services;
|
|
|
|
public record struct ProtectionNotifyModel(ulong GuildId, ProtectionType ProtType, ulong UserId) : INotifyModel
|
|
{
|
|
public static string KeyName
|
|
=> "notify.protection";
|
|
|
|
public static NotifyType NotifyType
|
|
=> NotifyType.Protection;
|
|
|
|
public IReadOnlyDictionary<string, Func<SocketGuild, string>> GetReplacements()
|
|
{
|
|
var data = this;
|
|
return new Dictionary<string, Func<SocketGuild, string>>()
|
|
{
|
|
{ "%event.type%", g => data.ProtType.ToString() },
|
|
};
|
|
}
|
|
|
|
public bool TryGetUserId(out ulong userId)
|
|
{
|
|
userId = UserId;
|
|
return true;
|
|
}
|
|
|
|
public bool TryGetGuildId(out ulong guildId)
|
|
{
|
|
guildId = GuildId;
|
|
return true;
|
|
}
|
|
} |