diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7b95b0b79..59c682fe7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,14 @@
Experimental changelog. Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except date format. a-c-f-r-o
+## [5.0.0]
+
+### Added
+
+- `.shopadd command` You can now sell commands in the shop. The command will execute as if you were the one running it when someone buys it
+ - type `.h .shopadd` for more info
+-
+
## [4.3.22] - 23.04.2023
### Added
diff --git a/src/Nadeko.Bot.Common/Nadeko.Bot.Common.csproj b/src/Nadeko.Bot.Common/Nadeko.Bot.Common.csproj
index dbafa63fd..a29c7f445 100644
--- a/src/Nadeko.Bot.Common/Nadeko.Bot.Common.csproj
+++ b/src/Nadeko.Bot.Common/Nadeko.Bot.Common.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/src/Nadeko.Bot.Db/Models/ShopEntry.cs b/src/Nadeko.Bot.Db/Models/ShopEntry.cs
index 585f48325..2e92e78ad 100644
--- a/src/Nadeko.Bot.Db/Models/ShopEntry.cs
+++ b/src/Nadeko.Bot.Db/Models/ShopEntry.cs
@@ -5,8 +5,8 @@ public enum ShopEntryType
{
Role,
- List
- //Infinite_List,
+ List,
+ Command
}
public class ShopEntry : DbEntity, IIndexed
@@ -25,6 +25,9 @@ public class ShopEntry : DbEntity, IIndexed
//list
public HashSet Items { get; set; } = new();
public ulong? RoleRequirement { get; set; }
+
+ // command
+ public string Command { get; set; }
}
public class ShopEntryItem : DbEntity
diff --git a/src/Nadeko.Bot.Modules.Administration/Nadeko.Bot.Modules.Administration.csproj b/src/Nadeko.Bot.Modules.Administration/Nadeko.Bot.Modules.Administration.csproj
index bc36938bb..3d6b96f25 100644
--- a/src/Nadeko.Bot.Modules.Administration/Nadeko.Bot.Modules.Administration.csproj
+++ b/src/Nadeko.Bot.Modules.Administration/Nadeko.Bot.Modules.Administration.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/src/Nadeko.Bot.Modules.Administration/Self/SelfService.cs b/src/Nadeko.Bot.Modules.Administration/Self/SelfService.cs
index 19ad30dfe..0a413742c 100644
--- a/src/Nadeko.Bot.Modules.Administration/Self/SelfService.cs
+++ b/src/Nadeko.Bot.Modules.Administration/Self/SelfService.cs
@@ -4,6 +4,7 @@ using Nadeko.Bot.Db.Models;
using System.Collections.Immutable;
using LinqToDB;
using LinqToDB.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore;
using NadekoBot.Db.Models;
namespace NadekoBot.Modules.Administration.Services;
diff --git a/src/Nadeko.Bot.Modules.Expresssions/Nadeko.Bot.Modules.Expresssions.csproj b/src/Nadeko.Bot.Modules.Expresssions/Nadeko.Bot.Modules.Expresssions.csproj
index 70bbd60a7..2e46b68f7 100644
--- a/src/Nadeko.Bot.Modules.Expresssions/Nadeko.Bot.Modules.Expresssions.csproj
+++ b/src/Nadeko.Bot.Modules.Expresssions/Nadeko.Bot.Modules.Expresssions.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/src/Nadeko.Bot.Modules.Gambling/Gambling/Shop/IShopService.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Shop/IShopService.cs
index 80b11b9a9..4fdec7e75 100644
--- a/src/Nadeko.Bot.Modules.Gambling/Gambling/Shop/IShopService.cs
+++ b/src/Nadeko.Bot.Modules.Gambling/Gambling/Shop/IShopService.cs
@@ -1,4 +1,6 @@
#nullable disable
+using Nadeko.Bot.Db.Models;
+
namespace NadekoBot.Modules.Gambling.Services;
public interface IShopService
@@ -40,4 +42,5 @@ public interface IShopService
Task MoveEntryAsync(ulong guildId, int fromIndex, int toIndex);
Task SetItemRoleRequirementAsync(ulong guildId, int index, ulong? roleId);
+ Task AddShopCommandAsync(ulong guildId, ulong userId, int price, string command);
}
\ No newline at end of file
diff --git a/src/Nadeko.Bot.Modules.Gambling/Gambling/Shop/ShopCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Shop/ShopCommands.cs
index 91786e529..3737f7d2d 100644
--- a/src/Nadeko.Bot.Modules.Gambling/Gambling/Shop/ShopCommands.cs
+++ b/src/Nadeko.Bot.Modules.Gambling/Gambling/Shop/ShopCommands.cs
@@ -4,6 +4,7 @@ using NadekoBot.Db;
using NadekoBot.Modules.Gambling.Common;
using NadekoBot.Modules.Gambling.Services;
using Nadeko.Bot.Db.Models;
+using NadekoBot.Modules.Administration;
namespace NadekoBot.Modules.Gambling;
@@ -22,6 +23,12 @@ public partial class Gambling
Role
}
+ public enum Command
+ {
+ Command,
+ Cmd
+ }
+
private readonly DbService _db;
private readonly ICurrencyService _cs;
@@ -39,8 +46,8 @@ public partial class Gambling
using var uow = _db.GetDbContext();
var entries = uow.GuildConfigsForId(ctx.Guild.Id,
- set => set.Include(x => x.ShopEntries).ThenInclude(x => x.Items))
- .ShopEntries.ToIndexed();
+ set => set.Include(x => x.ShopEntries).ThenInclude(x => x.Items))
+ .ShopEntries.ToIndexed();
return ctx.SendPaginatedConfirmAsync(page,
curPage =>
{
@@ -156,7 +163,7 @@ public partial class Gambling
return;
}
- if (entry.Type == ShopEntryType.List)
+ else if (entry.Type == ShopEntryType.List)
{
if (entry.Items.Count == 0)
{
@@ -177,11 +184,11 @@ public partial class Gambling
try
{
await ctx.User.EmbedAsync(_eb.Create()
- .WithOkColor()
- .WithTitle(GetText(strs.shop_purchase(ctx.Guild.Name)))
- .AddField(GetText(strs.item), item.Text)
- .AddField(GetText(strs.price), entry.Price.ToString(), true)
- .AddField(GetText(strs.name), entry.Name, true));
+ .WithOkColor()
+ .WithTitle(GetText(strs.shop_purchase(ctx.Guild.Name)))
+ .AddField(GetText(strs.item), item.Text)
+ .AddField(GetText(strs.price), entry.Price.ToString(), true)
+ .AddField(GetText(strs.name), entry.Name, true));
await _cs.AddAsync(entry.AuthorId,
GetProfitAmount(entry.Price),
@@ -193,9 +200,9 @@ public partial class Gambling
await using (var uow = _db.GetDbContext())
{
var entries = new IndexedCollection(uow.GuildConfigsForId(ctx.Guild.Id,
- set => set.Include(x => x.ShopEntries)
- .ThenInclude(x => x.Items))
- .ShopEntries);
+ set => set.Include(x => x.ShopEntries)
+ .ThenInclude(x => x.Items))
+ .ShopEntries);
entry = entries.ElementAtOrDefault(index);
if (entry is not null)
{
@@ -213,11 +220,79 @@ public partial class Gambling
else
await ReplyErrorLocalizedAsync(strs.not_enough(CurrencySign));
}
+ else if (entry.Type == ShopEntryType.Command)
+ {
+ var guild = ctx.Guild as SocketGuild;
+ var channel = ctx.Channel as ISocketMessageChannel;
+ var msg = ctx.Message as SocketUserMessage;
+ var user = await ctx.Guild.GetUserAsync(entry.AuthorId);
+
+ if (guild is null || channel is null || msg is null || user is null)
+ {
+ await ReplyErrorLocalizedAsync(strs.shop_command_invalid_context);
+ return;
+ }
+
+ if (!await _cs.RemoveAsync(ctx.User.Id, entry.Price, new("shop", "buy", entry.Type.ToString())))
+ {
+ await ReplyErrorLocalizedAsync(strs.not_enough(CurrencySign));
+ return;
+ }
+ else
+ {
+ var cmd = entry.Command.Replace("%you%", ctx.User.Id.ToString());
+ var eb = _eb.Create()
+ .WithPendingColor()
+ .WithTitle("Executing shop command")
+ .WithDescription(cmd);
+
+ var msgTask = ctx.Channel.EmbedAsync(eb);
+
+ await _cs.AddAsync(entry.AuthorId,
+ GetProfitAmount(entry.Price),
+ new("shop", "sell", entry.Name));
+
+ await _cmdHandler.TryRunCommand(guild,
+ channel,
+ new DoAsUserMessage(
+ msg,
+ user,
+ cmd
+ ));
+
+ try
+ {
+ var pendingMsg = await msgTask;
+ await pendingMsg.EditAsync(SmartEmbedText.FromEmbed(eb
+ .WithOkColor()
+ .WithTitle("Shop command executed")
+ .Build()));
+ }
+ catch
+ {
+ }
+ }
+ }
}
private static long GetProfitAmount(int price)
=> (int)Math.Ceiling(0.90 * price);
+ [Cmd]
+ [RequireContext(ContextType.Guild)]
+ [UserPerm(GuildPerm.Administrator)]
+ [BotPerm(GuildPerm.ManageRoles)]
+ public async Task ShopAdd(Command _, int price, [Leftover] string command)
+ {
+ if (price < 1)
+ return;
+
+
+ var entry = await _service.AddShopCommandAsync(ctx.Guild.Id, ctx.User.Id, price, command);
+
+ await ctx.Channel.EmbedAsync(EntryToEmbed(entry).WithTitle(GetText(strs.shop_item_add)));
+ }
+
[Cmd]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
@@ -239,9 +314,9 @@ public partial class Gambling
await using (var uow = _db.GetDbContext())
{
var entries = new IndexedCollection(uow.GuildConfigsForId(ctx.Guild.Id,
- set => set.Include(x => x.ShopEntries)
- .ThenInclude(x => x.Items))
- .ShopEntries)
+ set => set.Include(x => x.ShopEntries)
+ .ThenInclude(x => x.Items))
+ .ShopEntries)
{
entry
};
@@ -271,9 +346,9 @@ public partial class Gambling
await using (var uow = _db.GetDbContext())
{
var entries = new IndexedCollection(uow.GuildConfigsForId(ctx.Guild.Id,
- set => set.Include(x => x.ShopEntries)
- .ThenInclude(x => x.Items))
- .ShopEntries)
+ set => set.Include(x => x.ShopEntries)
+ .ThenInclude(x => x.Items))
+ .ShopEntries)
{
entry
};
@@ -302,9 +377,9 @@ public partial class Gambling
await using (var uow = _db.GetDbContext())
{
var entries = new IndexedCollection(uow.GuildConfigsForId(ctx.Guild.Id,
- set => set.Include(x => x.ShopEntries)
- .ThenInclude(x => x.Items))
- .ShopEntries);
+ set => set.Include(x => x.ShopEntries)
+ .ThenInclude(x => x.Items))
+ .ShopEntries);
entry = entries.ElementAtOrDefault(index);
if (entry is not null && (rightType = entry.Type == ShopEntryType.List))
{
@@ -456,19 +531,27 @@ public partial class Gambling
if (entry.Type == ShopEntryType.Role)
{
return embed
- .AddField(GetText(strs.name),
- GetText(strs.shop_role(Format.Bold(ctx.Guild.GetRole(entry.RoleId)?.Name
- ?? "MISSING_ROLE"))),
- true)
- .AddField(GetText(strs.price), N(entry.Price), true)
- .AddField(GetText(strs.type), entry.Type.ToString(), true);
+ .AddField(GetText(strs.name),
+ GetText(strs.shop_role(Format.Bold(ctx.Guild.GetRole(entry.RoleId)?.Name
+ ?? "MISSING_ROLE"))),
+ true)
+ .AddField(GetText(strs.price), N(entry.Price), true)
+ .AddField(GetText(strs.type), entry.Type.ToString(), true);
}
if (entry.Type == ShopEntryType.List)
{
return embed.AddField(GetText(strs.name), entry.Name, true)
- .AddField(GetText(strs.price), N(entry.Price), true)
- .AddField(GetText(strs.type), GetText(strs.random_unique_item), true);
+ .AddField(GetText(strs.price), N(entry.Price), true)
+ .AddField(GetText(strs.type), GetText(strs.random_unique_item), true);
+ }
+
+ else if (entry.Type == ShopEntryType.Command)
+ {
+ return embed
+ .AddField(GetText(strs.name), Format.Code(entry.Command), true)
+ .AddField(GetText(strs.price), N(entry.Price), true)
+ .AddField(GetText(strs.type), entry.Type.ToString(), true);
}
//else if (entry.Type == ShopEntryType.Infinite_List)
@@ -490,6 +573,9 @@ public partial class Gambling
+ GetText(strs.shop_role(Format.Bold(ctx.Guild.GetRole(entry.RoleId)?.Name ?? "MISSING_ROLE")));
if (entry.Type == ShopEntryType.List)
return prepend + GetText(strs.unique_items_left(entry.Items.Count)) + "\n" + entry.Name;
+
+ if (entry.Type == ShopEntryType.Command)
+ return prepend + Format.Code(entry.Command);
return prepend;
}
}
diff --git a/src/Nadeko.Bot.Modules.Gambling/Gambling/Shop/ShopService.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Shop/ShopService.cs
index 0a86c50a7..3c1725a73 100644
--- a/src/Nadeko.Bot.Modules.Gambling/Gambling/Shop/ShopService.cs
+++ b/src/Nadeko.Bot.Modules.Gambling/Gambling/Shop/ShopService.cs
@@ -1,7 +1,6 @@
#nullable disable
using Microsoft.EntityFrameworkCore;
using NadekoBot.Db;
-
using Nadeko.Bot.Db.Models;
namespace NadekoBot.Modules.Gambling.Services;
@@ -14,8 +13,10 @@ public class ShopService : IShopService, INService
=> _db = db;
private IndexedCollection GetEntriesInternal(DbContext uow, ulong guildId)
- => uow.GuildConfigsForId(guildId, set => set.Include(x => x.ShopEntries).ThenInclude(x => x.Items))
- .ShopEntries.ToIndexed();
+ => uow.GuildConfigsForId(guildId,
+ set => set.Include(x => x.ShopEntries)
+ .ThenInclude(x => x.Items))
+ .ShopEntries.ToIndexed();
public async Task ChangeEntryPriceAsync(ulong guildId, int index, int newPrice)
{
@@ -109,4 +110,24 @@ public class ShopService : IShopService, INService
await uow.SaveChangesAsync();
return true;
}
+
+ public async Task AddShopCommandAsync(ulong guildId, ulong userId, int price, string command)
+ {
+ await using var uow = _db.GetDbContext();
+
+ var entries = GetEntriesInternal(uow, guildId);
+ var entry = new ShopEntry()
+ {
+ AuthorId = userId,
+ Command = command,
+ Type = ShopEntryType.Command,
+ Price = price,
+ };
+ entries.Add(entry);
+ uow.GuildConfigsForId(guildId, set => set).ShopEntries = entries;
+
+ await uow.SaveChangesAsync();
+
+ return entry;
+ }
}
\ No newline at end of file
diff --git a/src/Nadeko.Bot.Modules.Permisssions/Nadeko.Bot.Modules.Permisssions.csproj b/src/Nadeko.Bot.Modules.Permisssions/Nadeko.Bot.Modules.Permisssions.csproj
index 45257727b..50b0081e8 100644
--- a/src/Nadeko.Bot.Modules.Permisssions/Nadeko.Bot.Modules.Permisssions.csproj
+++ b/src/Nadeko.Bot.Modules.Permisssions/Nadeko.Bot.Modules.Permisssions.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/src/NadekoBot/Db/Models/Waifu.cs b/src/NadekoBot/Db/Models/Waifu.cs
index 43a51dec7..002f3151d 100644
--- a/src/NadekoBot/Db/Models/Waifu.cs
+++ b/src/NadekoBot/Db/Models/Waifu.cs
@@ -1,4 +1,5 @@
#nullable disable
+using Nadeko.Bot.Db.Models;
using NadekoBot.Db.Models;
namespace NadekoBot.Services.Database.Models;
diff --git a/src/NadekoBot/Migrations/Mysql/20240423140608_shopcommands.Designer.cs b/src/NadekoBot/Migrations/Mysql/20240423140608_shopcommands.Designer.cs
new file mode 100644
index 000000000..419bc9d7d
--- /dev/null
+++ b/src/NadekoBot/Migrations/Mysql/20240423140608_shopcommands.Designer.cs
@@ -0,0 +1,3788 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Nadeko.Bot.Db;
+
+#nullable disable
+
+namespace NadekoBot.Db.Migrations.Mysql
+{
+ [DbContext(typeof(MysqlContext))]
+ [Migration("20240423140608_shopcommands")]
+ partial class shopcommands
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.3")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.AntiAltSetting", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("Action")
+ .HasColumnType("int")
+ .HasColumnName("action");
+
+ b.Property("ActionDurationMinutes")
+ .HasColumnType("int")
+ .HasColumnName("actiondurationminutes");
+
+ b.Property("GuildConfigId")
+ .HasColumnType("int")
+ .HasColumnName("guildconfigid");
+
+ b.Property("MinAge")
+ .HasColumnType("time(6)")
+ .HasColumnName("minage");
+
+ b.Property("RoleId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("roleid");
+
+ b.HasKey("Id")
+ .HasName("pk_antialtsetting");
+
+ b.HasIndex("GuildConfigId")
+ .IsUnique()
+ .HasDatabaseName("ix_antialtsetting_guildconfigid");
+
+ b.ToTable("antialtsetting", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.AntiRaidSetting", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("Action")
+ .HasColumnType("int")
+ .HasColumnName("action");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("GuildConfigId")
+ .HasColumnType("int")
+ .HasColumnName("guildconfigid");
+
+ b.Property("PunishDuration")
+ .HasColumnType("int")
+ .HasColumnName("punishduration");
+
+ b.Property("Seconds")
+ .HasColumnType("int")
+ .HasColumnName("seconds");
+
+ b.Property("UserThreshold")
+ .HasColumnType("int")
+ .HasColumnName("userthreshold");
+
+ b.HasKey("Id")
+ .HasName("pk_antiraidsetting");
+
+ b.HasIndex("GuildConfigId")
+ .IsUnique()
+ .HasDatabaseName("ix_antiraidsetting_guildconfigid");
+
+ b.ToTable("antiraidsetting", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.AntiSpamIgnore", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("AntiSpamSettingId")
+ .HasColumnType("int")
+ .HasColumnName("antispamsettingid");
+
+ b.Property("ChannelId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("channelid");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.HasKey("Id")
+ .HasName("pk_antispamignore");
+
+ b.HasIndex("AntiSpamSettingId")
+ .HasDatabaseName("ix_antispamignore_antispamsettingid");
+
+ b.ToTable("antispamignore", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.AntiSpamSetting", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("Action")
+ .HasColumnType("int")
+ .HasColumnName("action");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("GuildConfigId")
+ .HasColumnType("int")
+ .HasColumnName("guildconfigid");
+
+ b.Property("MessageThreshold")
+ .HasColumnType("int")
+ .HasColumnName("messagethreshold");
+
+ b.Property("MuteTime")
+ .HasColumnType("int")
+ .HasColumnName("mutetime");
+
+ b.Property("RoleId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("roleid");
+
+ b.HasKey("Id")
+ .HasName("pk_antispamsetting");
+
+ b.HasIndex("GuildConfigId")
+ .IsUnique()
+ .HasDatabaseName("ix_antispamsetting_guildconfigid");
+
+ b.ToTable("antispamsetting", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.AutoCommand", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("ChannelId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("channelid");
+
+ b.Property("ChannelName")
+ .HasColumnType("longtext")
+ .HasColumnName("channelname");
+
+ b.Property("CommandText")
+ .HasColumnType("longtext")
+ .HasColumnName("commandtext");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("GuildId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("guildid");
+
+ b.Property("GuildName")
+ .HasColumnType("longtext")
+ .HasColumnName("guildname");
+
+ b.Property("Interval")
+ .HasColumnType("int")
+ .HasColumnName("interval");
+
+ b.Property("VoiceChannelId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("voicechannelid");
+
+ b.Property("VoiceChannelName")
+ .HasColumnType("longtext")
+ .HasColumnName("voicechannelname");
+
+ b.HasKey("Id")
+ .HasName("pk_autocommands");
+
+ b.ToTable("autocommands", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.AutoTranslateChannel", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("AutoDelete")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("autodelete");
+
+ b.Property("ChannelId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("channelid");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("GuildId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("guildid");
+
+ b.HasKey("Id")
+ .HasName("pk_autotranslatechannels");
+
+ b.HasIndex("ChannelId")
+ .IsUnique()
+ .HasDatabaseName("ix_autotranslatechannels_channelid");
+
+ b.HasIndex("GuildId")
+ .HasDatabaseName("ix_autotranslatechannels_guildid");
+
+ b.ToTable("autotranslatechannels", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.AutoTranslateUser", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("ChannelId")
+ .HasColumnType("int")
+ .HasColumnName("channelid");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("Source")
+ .HasColumnType("longtext")
+ .HasColumnName("source");
+
+ b.Property("Target")
+ .HasColumnType("longtext")
+ .HasColumnName("target");
+
+ b.Property("UserId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("userid");
+
+ b.HasKey("Id")
+ .HasName("pk_autotranslateusers");
+
+ b.HasAlternateKey("ChannelId", "UserId")
+ .HasName("ak_autotranslateusers_channelid_userid");
+
+ b.ToTable("autotranslateusers", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.BanTemplate", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("GuildId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("guildid");
+
+ b.Property("PruneDays")
+ .HasColumnType("int")
+ .HasColumnName("prunedays");
+
+ b.Property("Text")
+ .HasColumnType("longtext")
+ .HasColumnName("text");
+
+ b.HasKey("Id")
+ .HasName("pk_bantemplates");
+
+ b.HasIndex("GuildId")
+ .IsUnique()
+ .HasDatabaseName("ix_bantemplates_guildid");
+
+ b.ToTable("bantemplates", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.BlacklistEntry", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("ItemId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("itemid");
+
+ b.Property("Type")
+ .HasColumnType("int")
+ .HasColumnName("type");
+
+ b.HasKey("Id")
+ .HasName("pk_blacklist");
+
+ b.ToTable("blacklist", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.CommandAlias", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("GuildConfigId")
+ .HasColumnType("int")
+ .HasColumnName("guildconfigid");
+
+ b.Property("Mapping")
+ .HasColumnType("longtext")
+ .HasColumnName("mapping");
+
+ b.Property("Trigger")
+ .HasColumnType("longtext")
+ .HasColumnName("trigger");
+
+ b.HasKey("Id")
+ .HasName("pk_commandalias");
+
+ b.HasIndex("GuildConfigId")
+ .HasDatabaseName("ix_commandalias_guildconfigid");
+
+ b.ToTable("commandalias", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.CommandCooldown", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("CommandName")
+ .HasColumnType("longtext")
+ .HasColumnName("commandname");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("GuildConfigId")
+ .HasColumnType("int")
+ .HasColumnName("guildconfigid");
+
+ b.Property("Seconds")
+ .HasColumnType("int")
+ .HasColumnName("seconds");
+
+ b.HasKey("Id")
+ .HasName("pk_commandcooldown");
+
+ b.HasIndex("GuildConfigId")
+ .HasDatabaseName("ix_commandcooldown_guildconfigid");
+
+ b.ToTable("commandcooldown", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.CurrencyTransaction", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("Amount")
+ .HasColumnType("bigint")
+ .HasColumnName("amount");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("Extra")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("extra");
+
+ b.Property("Note")
+ .HasColumnType("longtext")
+ .HasColumnName("note");
+
+ b.Property("OtherId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("otherid")
+ .HasDefaultValueSql("NULL");
+
+ b.Property("Type")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("type");
+
+ b.Property("UserId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("userid");
+
+ b.HasKey("Id")
+ .HasName("pk_currencytransactions");
+
+ b.HasIndex("UserId")
+ .HasDatabaseName("ix_currencytransactions_userid");
+
+ b.ToTable("currencytransactions", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.DelMsgOnCmdChannel", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("ChannelId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("channelid");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("GuildConfigId")
+ .HasColumnType("int")
+ .HasColumnName("guildconfigid");
+
+ b.Property("State")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("state");
+
+ b.HasKey("Id")
+ .HasName("pk_delmsgoncmdchannel");
+
+ b.HasIndex("GuildConfigId")
+ .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid");
+
+ b.ToTable("delmsgoncmdchannel", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordPermOverride", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("Command")
+ .HasColumnType("varchar(255)")
+ .HasColumnName("command");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("GuildId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("guildid");
+
+ b.Property("Perm")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("perm");
+
+ b.HasKey("Id")
+ .HasName("pk_discordpermoverrides");
+
+ b.HasIndex("GuildId", "Command")
+ .IsUnique()
+ .HasDatabaseName("ix_discordpermoverrides_guildid_command");
+
+ b.ToTable("discordpermoverrides", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.ExcludedItem", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("ItemId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("itemid");
+
+ b.Property("ItemType")
+ .HasColumnType("int")
+ .HasColumnName("itemtype");
+
+ b.Property("XpSettingsId")
+ .HasColumnType("int")
+ .HasColumnName("xpsettingsid");
+
+ b.HasKey("Id")
+ .HasName("pk_excludeditem");
+
+ b.HasIndex("XpSettingsId")
+ .HasDatabaseName("ix_excludeditem_xpsettingsid");
+
+ b.ToTable("excludeditem", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.FeedSub", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("ChannelId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("channelid");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("GuildConfigId")
+ .HasColumnType("int")
+ .HasColumnName("guildconfigid");
+
+ b.Property("Message")
+ .HasColumnType("longtext")
+ .HasColumnName("message");
+
+ b.Property("Url")
+ .IsRequired()
+ .HasColumnType("varchar(255)")
+ .HasColumnName("url");
+
+ b.HasKey("Id")
+ .HasName("pk_feedsub");
+
+ b.HasAlternateKey("GuildConfigId", "Url")
+ .HasName("ak_feedsub_guildconfigid_url");
+
+ b.ToTable("feedsub", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.FilterChannelId", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("ChannelId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("channelid");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("GuildConfigId")
+ .HasColumnType("int")
+ .HasColumnName("guildconfigid");
+
+ b.HasKey("Id")
+ .HasName("pk_filterchannelid");
+
+ b.HasIndex("GuildConfigId")
+ .HasDatabaseName("ix_filterchannelid_guildconfigid");
+
+ b.ToTable("filterchannelid", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.FilterLinksChannelId", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("ChannelId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("channelid");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("GuildConfigId")
+ .HasColumnType("int")
+ .HasColumnName("guildconfigid");
+
+ b.HasKey("Id")
+ .HasName("pk_filterlinkschannelid");
+
+ b.HasIndex("GuildConfigId")
+ .HasDatabaseName("ix_filterlinkschannelid_guildconfigid");
+
+ b.ToTable("filterlinkschannelid", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.FilterWordsChannelId", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("ChannelId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("channelid");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("GuildConfigId")
+ .HasColumnType("int")
+ .HasColumnName("guildconfigid");
+
+ b.HasKey("Id")
+ .HasName("pk_filterwordschannelid");
+
+ b.HasIndex("GuildConfigId")
+ .HasDatabaseName("ix_filterwordschannelid_guildconfigid");
+
+ b.ToTable("filterwordschannelid", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.FilteredWord", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("GuildConfigId")
+ .HasColumnType("int")
+ .HasColumnName("guildconfigid");
+
+ b.Property("Word")
+ .HasColumnType("longtext")
+ .HasColumnName("word");
+
+ b.HasKey("Id")
+ .HasName("pk_filteredword");
+
+ b.HasIndex("GuildConfigId")
+ .HasDatabaseName("ix_filteredword_guildconfigid");
+
+ b.ToTable("filteredword", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.GCChannelId", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("ChannelId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("channelid");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("GuildConfigId")
+ .HasColumnType("int")
+ .HasColumnName("guildconfigid");
+
+ b.HasKey("Id")
+ .HasName("pk_gcchannelid");
+
+ b.HasIndex("GuildConfigId")
+ .HasDatabaseName("ix_gcchannelid_guildconfigid");
+
+ b.ToTable("gcchannelid", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.GamblingStats", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("Bet")
+ .HasColumnType("decimal(65,30)")
+ .HasColumnName("bet");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("Feature")
+ .HasColumnType("varchar(255)")
+ .HasColumnName("feature");
+
+ b.Property("PaidOut")
+ .HasColumnType("decimal(65,30)")
+ .HasColumnName("paidout");
+
+ b.HasKey("Id")
+ .HasName("pk_gamblingstats");
+
+ b.HasIndex("Feature")
+ .IsUnique()
+ .HasDatabaseName("ix_gamblingstats_feature");
+
+ b.ToTable("gamblingstats", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.GroupName", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("GuildConfigId")
+ .HasColumnType("int")
+ .HasColumnName("guildconfigid");
+
+ b.Property("Name")
+ .HasColumnType("longtext")
+ .HasColumnName("name");
+
+ b.Property("Number")
+ .HasColumnType("int")
+ .HasColumnName("number");
+
+ b.HasKey("Id")
+ .HasName("pk_groupname");
+
+ b.HasIndex("GuildConfigId", "Number")
+ .IsUnique()
+ .HasDatabaseName("ix_groupname_guildconfigid_number");
+
+ b.ToTable("groupname", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.GuildConfig", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("AutoAssignRoleIds")
+ .HasColumnType("longtext")
+ .HasColumnName("autoassignroleids");
+
+ b.Property("AutoDeleteByeMessagesTimer")
+ .HasColumnType("int")
+ .HasColumnName("autodeletebyemessagestimer");
+
+ b.Property("AutoDeleteGreetMessagesTimer")
+ .HasColumnType("int")
+ .HasColumnName("autodeletegreetmessagestimer");
+
+ b.Property("AutoDeleteSelfAssignedRoleMessages")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("autodeleteselfassignedrolemessages");
+
+ b.Property("BoostMessage")
+ .HasColumnType("longtext")
+ .HasColumnName("boostmessage");
+
+ b.Property("BoostMessageChannelId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("boostmessagechannelid");
+
+ b.Property("BoostMessageDeleteAfter")
+ .HasColumnType("int")
+ .HasColumnName("boostmessagedeleteafter");
+
+ b.Property("ByeMessageChannelId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("byemessagechannelid");
+
+ b.Property("ChannelByeMessageText")
+ .HasColumnType("longtext")
+ .HasColumnName("channelbyemessagetext");
+
+ b.Property("ChannelGreetMessageText")
+ .HasColumnType("longtext")
+ .HasColumnName("channelgreetmessagetext");
+
+ b.Property("CleverbotEnabled")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("cleverbotenabled");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("DeleteMessageOnCommand")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("deletemessageoncommand");
+
+ b.Property("DeleteStreamOnlineMessage")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("deletestreamonlinemessage");
+
+ b.Property("DisableGlobalExpressions")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("disableglobalexpressions");
+
+ b.Property("DmGreetMessageText")
+ .HasColumnType("longtext")
+ .HasColumnName("dmgreetmessagetext");
+
+ b.Property("ExclusiveSelfAssignedRoles")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("exclusiveselfassignedroles");
+
+ b.Property("FilterInvites")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("filterinvites");
+
+ b.Property("FilterLinks")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("filterlinks");
+
+ b.Property("FilterWords")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("filterwords");
+
+ b.Property("GameVoiceChannel")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("gamevoicechannel");
+
+ b.Property("GreetMessageChannelId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("greetmessagechannelid");
+
+ b.Property("GuildId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("guildid");
+
+ b.Property("Locale")
+ .HasColumnType("longtext")
+ .HasColumnName("locale");
+
+ b.Property("MuteRoleName")
+ .HasColumnType("longtext")
+ .HasColumnName("muterolename");
+
+ b.Property("NotifyStreamOffline")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("notifystreamoffline");
+
+ b.Property("PermissionRole")
+ .HasColumnType("longtext")
+ .HasColumnName("permissionrole");
+
+ b.Property("Prefix")
+ .HasColumnType("longtext")
+ .HasColumnName("prefix");
+
+ b.Property("SendBoostMessage")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("sendboostmessage");
+
+ b.Property("SendChannelByeMessage")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("sendchannelbyemessage");
+
+ b.Property("SendChannelGreetMessage")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("sendchannelgreetmessage");
+
+ b.Property("SendDmGreetMessage")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("senddmgreetmessage");
+
+ b.Property("TimeZoneId")
+ .HasColumnType("longtext")
+ .HasColumnName("timezoneid");
+
+ b.Property("VerboseErrors")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(true)
+ .HasColumnName("verboseerrors");
+
+ b.Property("VerbosePermissions")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("verbosepermissions");
+
+ b.Property("WarnExpireAction")
+ .HasColumnType("int")
+ .HasColumnName("warnexpireaction");
+
+ b.Property("WarnExpireHours")
+ .HasColumnType("int")
+ .HasColumnName("warnexpirehours");
+
+ b.Property("WarningsInitialized")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("warningsinitialized");
+
+ b.HasKey("Id")
+ .HasName("pk_guildconfigs");
+
+ b.HasIndex("GuildId")
+ .IsUnique()
+ .HasDatabaseName("ix_guildconfigs_guildid");
+
+ b.HasIndex("WarnExpireHours")
+ .HasDatabaseName("ix_guildconfigs_warnexpirehours");
+
+ b.ToTable("guildconfigs", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.IgnoredLogItem", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("ItemType")
+ .HasColumnType("int")
+ .HasColumnName("itemtype");
+
+ b.Property("LogItemId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("logitemid");
+
+ b.Property("LogSettingId")
+ .HasColumnType("int")
+ .HasColumnName("logsettingid");
+
+ b.HasKey("Id")
+ .HasName("pk_ignoredlogchannels");
+
+ b.HasIndex("LogSettingId", "LogItemId", "ItemType")
+ .IsUnique()
+ .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype");
+
+ b.ToTable("ignoredlogchannels", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.IgnoredVoicePresenceChannel", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("ChannelId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("channelid");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("LogSettingId")
+ .HasColumnType("int")
+ .HasColumnName("logsettingid");
+
+ b.HasKey("Id")
+ .HasName("pk_ignoredvoicepresencechannels");
+
+ b.HasIndex("LogSettingId")
+ .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid");
+
+ b.ToTable("ignoredvoicepresencechannels", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.ImageOnlyChannel", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("ChannelId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("channelid");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("GuildId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("guildid");
+
+ b.Property("Type")
+ .HasColumnType("int")
+ .HasColumnName("type");
+
+ b.HasKey("Id")
+ .HasName("pk_imageonlychannels");
+
+ b.HasIndex("ChannelId")
+ .IsUnique()
+ .HasDatabaseName("ix_imageonlychannels_channelid");
+
+ b.ToTable("imageonlychannels", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.LogSetting", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("ChannelCreatedId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("channelcreatedid");
+
+ b.Property("ChannelDestroyedId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("channeldestroyedid");
+
+ b.Property("ChannelUpdatedId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("channelupdatedid");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("GuildId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("guildid");
+
+ b.Property("LogOtherId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("logotherid");
+
+ b.Property("LogUserPresenceId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("loguserpresenceid");
+
+ b.Property("LogVoicePresenceId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("logvoicepresenceid");
+
+ b.Property("LogVoicePresenceTTSId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("logvoicepresencettsid");
+
+ b.Property("LogWarnsId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("logwarnsid");
+
+ b.Property("MessageDeletedId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("messagedeletedid");
+
+ b.Property("MessageUpdatedId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("messageupdatedid");
+
+ b.Property("ThreadCreatedId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("threadcreatedid");
+
+ b.Property("ThreadDeletedId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("threaddeletedid");
+
+ b.Property("UserBannedId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("userbannedid");
+
+ b.Property("UserJoinedId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("userjoinedid");
+
+ b.Property("UserLeftId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("userleftid");
+
+ b.Property("UserMutedId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("usermutedid");
+
+ b.Property("UserUnbannedId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("userunbannedid");
+
+ b.Property("UserUpdatedId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("userupdatedid");
+
+ b.HasKey("Id")
+ .HasName("pk_logsettings");
+
+ b.HasIndex("GuildId")
+ .IsUnique()
+ .HasDatabaseName("ix_logsettings_guildid");
+
+ b.ToTable("logsettings", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.MusicPlayerSettings", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("AutoDisconnect")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("autodisconnect");
+
+ b.Property("AutoPlay")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("autoplay");
+
+ b.Property("GuildId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("guildid");
+
+ b.Property("MusicChannelId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("musicchannelid");
+
+ b.Property("PlayerRepeat")
+ .HasColumnType("int")
+ .HasColumnName("playerrepeat");
+
+ b.Property("QualityPreset")
+ .HasColumnType("int")
+ .HasColumnName("qualitypreset");
+
+ b.Property("Volume")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasDefaultValue(100)
+ .HasColumnName("volume");
+
+ b.HasKey("Id")
+ .HasName("pk_musicplayersettings");
+
+ b.HasIndex("GuildId")
+ .IsUnique()
+ .HasDatabaseName("ix_musicplayersettings_guildid");
+
+ b.ToTable("musicplayersettings", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.MusicPlaylist", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("Author")
+ .HasColumnType("longtext")
+ .HasColumnName("author");
+
+ b.Property("AuthorId")
+ .HasColumnType("bigint unsigned")
+ .HasColumnName("authorid");
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("Name")
+ .HasColumnType("longtext")
+ .HasColumnName("name");
+
+ b.HasKey("Id")
+ .HasName("pk_musicplaylists");
+
+ b.ToTable("musicplaylists", (string)null);
+ });
+
+ modelBuilder.Entity("Nadeko.Bot.Db.Models.MutedUserId", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("DateAdded")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("dateadded");
+
+ b.Property("GuildConfigId")
+ .HasColumnType("int")
+ .HasColumnName("guildconfigid");
+
+ b.Property