Added giveaway commands .ga start/end/cancel/reroll/list

This commit is contained in:
Kwoth
2024-04-24 22:31:45 +00:00
parent 59b9742c19
commit 49563ea6d4
16 changed files with 247 additions and 57 deletions

View File

@@ -12,7 +12,7 @@ using Nadeko.Bot.Db;
namespace NadekoBot.Db.Migrations.Mysql
{
[DbContext(typeof(MysqlContext))]
[Migration("20240424152958_giveaway")]
[Migration("20240424203922_giveaway")]
partial class giveaway
{
/// <inheritdoc />
@@ -3085,6 +3085,10 @@ namespace NadekoBot.Db.Migrations.Mysql
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<ulong>("ChannelId")
.HasColumnType("bigint unsigned")
.HasColumnName("channelid");
b.Property<DateTime>("EndsAt")
.HasColumnType("datetime(6)")
.HasColumnName("endsat");

View File

@@ -20,6 +20,7 @@ namespace NadekoBot.Db.Migrations.Mysql
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
guildid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
messageid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
channelid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
message = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
endsat = table.Column<DateTime>(type: "datetime(6)", nullable: false)

View File

@@ -3082,6 +3082,10 @@ namespace NadekoBot.Db.Migrations.Mysql
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<ulong>("ChannelId")
.HasColumnType("bigint unsigned")
.HasColumnName("channelid");
b.Property<DateTime>("EndsAt")
.HasColumnType("datetime(6)")
.HasColumnName("endsat");

View File

@@ -12,7 +12,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace NadekoBot.Db.Migrations
{
[DbContext(typeof(PostgreSqlContext))]
[Migration("20240424152951_giveaway")]
[Migration("20240424203915_giveaway")]
partial class giveaway
{
/// <inheritdoc />
@@ -3084,6 +3084,10 @@ namespace NadekoBot.Db.Migrations
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<decimal>("ChannelId")
.HasColumnType("numeric(20,0)")
.HasColumnName("channelid");
b.Property<DateTime>("EndsAt")
.HasColumnType("timestamp without time zone")
.HasColumnName("endsat");

View File

@@ -20,6 +20,7 @@ namespace NadekoBot.Db.Migrations
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
guildid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
messageid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
channelid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
message = table.Column<string>(type: "text", nullable: false),
endsat = table.Column<DateTime>(type: "timestamp without time zone", nullable: false)
},

View File

@@ -3081,6 +3081,10 @@ namespace NadekoBot.Db.Migrations
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<decimal>("ChannelId")
.HasColumnType("numeric(20,0)")
.HasColumnName("channelid");
b.Property<DateTime>("EndsAt")
.HasColumnType("timestamp without time zone")
.HasColumnName("endsat");

View File

@@ -11,7 +11,7 @@ using Nadeko.Bot.Db;
namespace NadekoBot.Db.Migrations.Sqlite
{
[DbContext(typeof(SqliteContext))]
[Migration("20240424152943_giveaway")]
[Migration("20240424203909_giveaway")]
partial class giveaway
{
/// <inheritdoc />
@@ -2289,6 +2289,9 @@ namespace NadekoBot.Db.Migrations.Sqlite
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<ulong>("ChannelId")
.HasColumnType("INTEGER");
b.Property<DateTime>("EndsAt")
.HasColumnType("TEXT");

View File

@@ -19,6 +19,7 @@ namespace NadekoBot.Db.Migrations.Sqlite
.Annotation("Sqlite:Autoincrement", true),
GuildId = table.Column<ulong>(type: "INTEGER", nullable: false),
MessageId = table.Column<ulong>(type: "INTEGER", nullable: false),
ChannelId = table.Column<ulong>(type: "INTEGER", nullable: false),
Message = table.Column<string>(type: "TEXT", nullable: false),
EndsAt = table.Column<DateTime>(type: "TEXT", nullable: false)
},

View File

@@ -2286,6 +2286,9 @@ namespace NadekoBot.Db.Migrations.Sqlite
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<ulong>("ChannelId")
.HasColumnType("INTEGER");
b.Property<DateTime>("EndsAt")
.HasColumnType("TEXT");