- Reaction roles rewritten completely. They now support multiple exclusivity groups per message and level requirements. However they can only be added one by one

- Bot now support much higher XP values for global and server levels
This commit is contained in:
Kwoth
2022-05-04 02:08:15 +02:00
parent 5cb95cf94d
commit 5b5bc278ff
35 changed files with 10820 additions and 715 deletions

View File

@@ -17,7 +17,7 @@ namespace NadekoBot.Migrations.PostgreSql
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.3")
.HasAnnotation("ProductVersion", "6.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
@@ -1901,41 +1901,7 @@ namespace NadekoBot.Migrations.PostgreSql
b.ToTable("quotes", (string)null);
});
modelBuilder.Entity("NadekoBot.Services.Database.Models.ReactionRole", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("DateAdded")
.HasColumnType("timestamp with time zone")
.HasColumnName("dateadded");
b.Property<string>("EmoteName")
.HasColumnType("text")
.HasColumnName("emotename");
b.Property<int?>("ReactionRoleMessageId")
.HasColumnType("integer")
.HasColumnName("reactionrolemessageid");
b.Property<decimal>("RoleId")
.HasColumnType("numeric(20,0)")
.HasColumnName("roleid");
b.HasKey("Id")
.HasName("pk_reactionrole");
b.HasIndex("ReactionRoleMessageId")
.HasDatabaseName("ix_reactionrole_reactionrolemessageid");
b.ToTable("reactionrole", (string)null);
});
modelBuilder.Entity("NadekoBot.Services.Database.Models.ReactionRoleMessage", b =>
modelBuilder.Entity("NadekoBot.Services.Database.Models.ReactionRoleV2", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@@ -1952,29 +1918,42 @@ namespace NadekoBot.Migrations.PostgreSql
.HasColumnType("timestamp with time zone")
.HasColumnName("dateadded");
b.Property<bool>("Exclusive")
.HasColumnType("boolean")
.HasColumnName("exclusive");
b.Property<string>("Emote")
.HasMaxLength(100)
.HasColumnType("character varying(100)")
.HasColumnName("emote");
b.Property<int>("GuildConfigId")
b.Property<int>("Group")
.HasColumnType("integer")
.HasColumnName("guildconfigid");
.HasColumnName("group");
b.Property<int>("Index")
b.Property<decimal>("GuildId")
.HasColumnType("numeric(20,0)")
.HasColumnName("guildid");
b.Property<int>("LevelReq")
.HasColumnType("integer")
.HasColumnName("index");
.HasColumnName("levelreq");
b.Property<decimal>("MessageId")
.HasColumnType("numeric(20,0)")
.HasColumnName("messageid");
b.Property<decimal>("RoleId")
.HasColumnType("numeric(20,0)")
.HasColumnName("roleid");
b.HasKey("Id")
.HasName("pk_reactionrolemessage");
.HasName("pk_reactionroles");
b.HasIndex("GuildConfigId")
.HasDatabaseName("ix_reactionrolemessage_guildconfigid");
b.HasIndex("GuildId")
.HasDatabaseName("ix_reactionroles_guildid");
b.ToTable("reactionrolemessage", (string)null);
b.HasIndex("MessageId", "Emote")
.IsUnique()
.HasDatabaseName("ix_reactionroles_messageid_emote");
b.ToTable("reactionroles", (string)null);
});
modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b =>
@@ -3250,27 +3229,6 @@ namespace NadekoBot.Migrations.PostgreSql
.HasConstraintName("fk_pollvote_poll_pollid");
});
modelBuilder.Entity("NadekoBot.Services.Database.Models.ReactionRole", b =>
{
b.HasOne("NadekoBot.Services.Database.Models.ReactionRoleMessage", null)
.WithMany("ReactionRoles")
.HasForeignKey("ReactionRoleMessageId")
.OnDelete(DeleteBehavior.Cascade)
.HasConstraintName("fk_reactionrole_reactionrolemessage_reactionrolemessageid");
});
modelBuilder.Entity("NadekoBot.Services.Database.Models.ReactionRoleMessage", b =>
{
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig")
.WithMany("ReactionRoleMessages")
.HasForeignKey("GuildConfigId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_reactionrolemessage_guildconfigs_guildconfigid");
b.Navigation("GuildConfig");
});
modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b =>
{
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
@@ -3520,8 +3478,6 @@ namespace NadekoBot.Migrations.PostgreSql
b.Navigation("Permissions");
b.Navigation("ReactionRoleMessages");
b.Navigation("SelfAssignableRoleGroupNames");
b.Navigation("ShopEntries");
@@ -3562,11 +3518,6 @@ namespace NadekoBot.Migrations.PostgreSql
b.Navigation("Votes");
});
modelBuilder.Entity("NadekoBot.Services.Database.Models.ReactionRoleMessage", b =>
{
b.Navigation("ReactionRoles");
});
modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b =>
{
b.Navigation("Items");