Small refactor for ILogCommandService

This commit is contained in:
Kwoth
2022-01-01 07:33:06 +01:00
parent 8c6fcd2ce6
commit f81f9fadd3
4 changed files with 32 additions and 24 deletions

View File

@@ -1,10 +1,9 @@
#nullable disable #nullable disable
using Discord.Interactions;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using NadekoBot.Common.Configs; using NadekoBot.Common.Configs;
using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Common.ModuleBehaviors;
using NadekoBot.Db; using NadekoBot.Db;
using NadekoBot.Modules.Administration.Services; using NadekoBot.Modules.Administration;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using System.Collections.Immutable; using System.Collections.Immutable;
using System.Diagnostics; using System.Diagnostics;

View File

@@ -0,0 +1,31 @@
using NadekoBot.Services.Database.Models;
namespace NadekoBot.Common;
public interface ILogCommandService
{
void AddDeleteIgnore(ulong xId);
Task LogServer(ulong guildId, ulong channelId, bool actionValue);
bool LogIgnore(ulong guildId, ulong itemId, IgnoredItemType itemType);
LogSetting? GetGuildLogSettings(ulong guildId);
bool Log(ulong guildId, ulong? channelId, LogType type);
}
public enum LogType
{
Other,
MessageUpdated,
MessageDeleted,
UserJoined,
UserLeft,
UserBanned,
UserUnbanned,
UserUpdated,
ChannelCreated,
ChannelDestroyed,
ChannelUpdated,
UserPresence,
VoicePresence,
VoicePresenceTTS,
UserMuted
}

View File

@@ -1,21 +0,0 @@
#nullable disable
namespace NadekoBot.Modules.Administration;
public enum LogType
{
Other,
MessageUpdated,
MessageDeleted,
UserJoined,
UserLeft,
UserBanned,
UserUnbanned,
UserUpdated,
ChannelCreated,
ChannelDestroyed,
ChannelUpdated,
UserPresence,
VoicePresence,
VoicePresenceTTS,
UserMuted
}

View File

@@ -1,5 +1,4 @@
#nullable disable #nullable disable
using NadekoBot.Modules.Administration.Services;
using NadekoBot.Modules.Music.Services; using NadekoBot.Modules.Music.Services;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;