feat: guild ban add/remove logging, store banned systems in database
This commit is contained in:
parent
ca99bdfb94
commit
8e030acaf3
12 changed files with 227 additions and 36 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Catalogger.Backend.Extensions;
|
||||
using Catalogger.Backend.Services;
|
||||
using Remora.Rest.Core;
|
||||
|
||||
namespace Catalogger.Backend.Database.Models;
|
||||
|
|
@ -14,6 +15,9 @@ public class Guild
|
|||
public List<string> BannedSystems { get; init; } = [];
|
||||
public List<ulong> KeyRoles { get; init; } = [];
|
||||
|
||||
public bool IsSystemBanned(PluralkitApiService.PkSystem system) =>
|
||||
BannedSystems.Contains(system.Id) || BannedSystems.Contains(system.Uuid.ToString());
|
||||
|
||||
public bool IsMessageIgnored(Snowflake channelId, Snowflake userId)
|
||||
{
|
||||
if (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue