Small refactoring. Finally made use of the type parameter in NadekoTypeReader<T> class

This commit is contained in:
Kwoth
2022-01-31 05:45:51 +01:00
parent 0f36242597
commit 3e0bbd8ada
29 changed files with 130 additions and 128 deletions

View File

@@ -24,7 +24,7 @@ public class AntiSpamSetting : DbEntity
public PunishmentAction Action { get; set; }
public int MessageThreshold { get; set; } = 3;
public int MuteTime { get; set; } = 0;
public int MuteTime { get; set; }
public ulong? RoleId { get; set; }
public HashSet<AntiSpamIgnore> IgnoredChannels { get; set; } = new();
}

View File

@@ -8,7 +8,7 @@ public class GuildConfig : DbEntity
{
public ulong GuildId { get; set; }
public string Prefix { get; set; } = null;
public string Prefix { get; set; }
public bool DeleteMessageOnCommand { get; set; }
public HashSet<DelMsgOnCmdChannel> DelMsgOnCmdChannels { get; set; } = new();
@@ -16,8 +16,6 @@ public class GuildConfig : DbEntity
public string AutoAssignRoleIds { get; set; }
//greet stuff
public bool AutoDeleteGreetMessages { get; set; } //unused
public bool AutoDeleteByeMessages { get; set; } // unused
public int AutoDeleteGreetMessagesTimer { get; set; } = 30;
public int AutoDeleteByeMessagesTimer { get; set; } = 30;
@@ -45,7 +43,7 @@ public class GuildConfig : DbEntity
public List<Permissionv2> Permissions { get; set; }
public bool VerbosePermissions { get; set; } = true;
public string PermissionRole { get; set; } = null;
public string PermissionRole { get; set; }
public HashSet<CommandCooldown> CommandCooldowns { get; set; } = new();
@@ -71,8 +69,8 @@ public class GuildConfig : DbEntity
public AntiSpamSetting AntiSpamSetting { get; set; }
public AntiAltSetting AntiAltSetting { get; set; }
public string Locale { get; set; } = null;
public string TimeZoneId { get; set; } = null;
public string Locale { get; set; }
public string TimeZoneId { get; set; }
public HashSet<UnmuteTimer> UnmuteTimers { get; set; } = new();
public HashSet<UnbanTimer> UnbanTimer { get; set; } = new();
@@ -85,8 +83,8 @@ public class GuildConfig : DbEntity
public HashSet<SlowmodeIgnoredRole> SlowmodeIgnoredRoles { get; set; }
public List<ShopEntry> ShopEntries { get; set; }
public ulong? GameVoiceChannel { get; set; } = null;
public bool VerboseErrors { get; set; } = false;
public ulong? GameVoiceChannel { get; set; }
public bool VerboseErrors { get; set; }
public StreamRoleSettings StreamRole { get; set; }
@@ -95,7 +93,7 @@ public class GuildConfig : DbEntity
public IndexedCollection<ReactionRoleMessage> ReactionRoleMessages { get; set; } = new();
public bool NotifyStreamOffline { get; set; }
public List<GroupName> SelfAssignableRoleGroupNames { get; set; }
public int WarnExpireHours { get; set; } = 0;
public int WarnExpireHours { get; set; }
public WarnExpireAction WarnExpireAction { get; set; } = WarnExpireAction.Clear;
#region Boost Message

View File

@@ -21,7 +21,7 @@ public class MusicPlayerSettings
/// <summary>
/// Channel id the bot will always try to send track related messages to
/// </summary>
public ulong? MusicChannelId { get; set; } = null;
public ulong? MusicChannelId { get; set; }
/// <summary>
/// Default volume player will be created with
@@ -32,7 +32,7 @@ public class MusicPlayerSettings
/// Whether the bot should auto disconnect from the voice channel once the queue is done
/// This only has effect if
/// </summary>
public bool AutoDisconnect { get; set; } = false;
public bool AutoDisconnect { get; set; }
/// <summary>
/// Selected quality preset for the music player