* feature: Added .stickyroles command, untested

* ci: possible fix
This commit is contained in:
Kwoth
2024-04-23 15:45:09 +00:00
parent 74690c73d6
commit 08d8da25cd
20 changed files with 11093 additions and 12 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,55 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace NadekoBot.Db.Migrations.Sqlite
{
/// <inheritdoc />
public partial class stickyroles : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "StickyRoles",
table: "GuildConfigs",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.CreateTable(
name: "StickyRoles",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
GuildId = table.Column<ulong>(type: "INTEGER", nullable: false),
RoleIds = table.Column<string>(type: "TEXT", nullable: false),
UserId = table.Column<ulong>(type: "INTEGER", nullable: false),
DateAdded = table.Column<DateTime>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_StickyRoles", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_StickyRoles_GuildId_UserId",
table: "StickyRoles",
columns: new[] { "GuildId", "UserId" },
unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "StickyRoles");
migrationBuilder.DropColumn(
name: "StickyRoles",
table: "GuildConfigs");
}
}
}

View File

@@ -729,6 +729,9 @@ namespace NadekoBot.Db.Migrations.Sqlite
b.Property<bool>("SendDmGreetMessage")
.HasColumnType("INTEGER");
b.Property<bool>("StickyRoles")
.HasColumnType("INTEGER");
b.Property<string>("TimeZoneId")
.HasColumnType("TEXT");
@@ -1577,6 +1580,33 @@ namespace NadekoBot.Db.Migrations.Sqlite
b.ToTable("SlowmodeIgnoredUser");
});
modelBuilder.Entity("Nadeko.Bot.Db.Models.StickyRole", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime?>("DateAdded")
.HasColumnType("TEXT");
b.Property<ulong>("GuildId")
.HasColumnType("INTEGER");
b.Property<string>("RoleIds")
.IsRequired()
.HasColumnType("TEXT");
b.Property<ulong>("UserId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("GuildId", "UserId")
.IsUnique();
b.ToTable("StickyRoles");
});
modelBuilder.Entity("Nadeko.Bot.Db.Models.StreamRoleBlacklistedUser", b =>
{
b.Property<int>("Id")