mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 00:34:26 -05:00 
			
		
		
		
	Added giveaway commands .ga start/end/cancel/reroll/list
This commit is contained in:
		@@ -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");
 | 
			
		||||
@@ -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)
 | 
			
		||||
@@ -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");
 | 
			
		||||
 
 | 
			
		||||
@@ -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");
 | 
			
		||||
@@ -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)
 | 
			
		||||
                },
 | 
			
		||||
@@ -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");
 | 
			
		||||
 
 | 
			
		||||
@@ -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");
 | 
			
		||||
 | 
			
		||||
@@ -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)
 | 
			
		||||
                },
 | 
			
		||||
@@ -2286,6 +2286,9 @@ namespace NadekoBot.Db.Migrations.Sqlite
 | 
			
		||||
                        .ValueGeneratedOnAdd()
 | 
			
		||||
                        .HasColumnType("INTEGER");
 | 
			
		||||
 | 
			
		||||
                    b.Property<ulong>("ChannelId")
 | 
			
		||||
                        .HasColumnType("INTEGER");
 | 
			
		||||
 | 
			
		||||
                    b.Property<DateTime>("EndsAt")
 | 
			
		||||
                        .HasColumnType("TEXT");
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -633,7 +633,7 @@ quotesearch:
 | 
			
		||||
  desc: "Shows a random quote given a search query. Partially matches in several ways: 1) Only content of any quote, 2) only by author, 3) keyword and content, 3) or keyword and author"
 | 
			
		||||
  args:
 | 
			
		||||
    - "\"find this long text\""
 | 
			
		||||
    - "AuthorName" 
 | 
			
		||||
    - "AuthorName"
 | 
			
		||||
    - "keyword some text"
 | 
			
		||||
    - "keyword AuthorName"
 | 
			
		||||
quoteid:
 | 
			
		||||
@@ -2006,7 +2006,7 @@ ytuploadnotif:
 | 
			
		||||
    Shortcut for `.feed https://www.youtube.com/feeds/videos.xml?channel_id=%3Cyoutube_channel_id`
 | 
			
		||||
    You can optionally specify a message which will be posted with an update.
 | 
			
		||||
  args:
 | 
			
		||||
    - "https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow" 
 | 
			
		||||
    - "https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow"
 | 
			
		||||
    - "https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow New video is posted"
 | 
			
		||||
feed:
 | 
			
		||||
  desc: |-
 | 
			
		||||
@@ -2266,7 +2266,7 @@ deleteemptyservers:
 | 
			
		||||
  args:
 | 
			
		||||
    - ""
 | 
			
		||||
medusaload:
 | 
			
		||||
  desc: |- 
 | 
			
		||||
  desc: |-
 | 
			
		||||
    Loads a medusa with the specified name from the data/medusae/ folder.
 | 
			
		||||
    Provide no name to see the list of loadable medusae.
 | 
			
		||||
    Read about the medusa system [here](https://nadekobot.readthedocs.io/en/latest/medusa/creating-a-medusa/)
 | 
			
		||||
@@ -2289,7 +2289,7 @@ medusainfo:
 | 
			
		||||
  args:
 | 
			
		||||
    - "mycoolmedusa"
 | 
			
		||||
    - ""
 | 
			
		||||
medusalist: 
 | 
			
		||||
medusalist:
 | 
			
		||||
  desc: |-
 | 
			
		||||
    Lists all loaded and unloaded medusae.
 | 
			
		||||
    Read about the medusa system [here](https://nadekobot.readthedocs.io/en/latest/medusa/creating-a-medusa/)
 | 
			
		||||
@@ -2329,7 +2329,7 @@ patronmessage:
 | 
			
		||||
  args:
 | 
			
		||||
    - "x hello"
 | 
			
		||||
eval:
 | 
			
		||||
  desc: |- 
 | 
			
		||||
  desc: |-
 | 
			
		||||
    Execute arbitrary C# code and (optionally) return a result. Several namespaces are included by default.
 | 
			
		||||
    Special variables available: 
 | 
			
		||||
    `self` - Instance of the command group executing the command (this)
 | 
			
		||||
@@ -2397,15 +2397,15 @@ giveawaystart:
 | 
			
		||||
    - "15m Quick giveaway for a free course!"
 | 
			
		||||
    - "1d Join to win 1000$!"
 | 
			
		||||
giveawayend:
 | 
			
		||||
  desc: "Prematurely ends a giveaway and chooses a winner. Specify the ID of the giveaway to end."
 | 
			
		||||
  desc: "Prematurely ends a giveaway and selects a winner. Specify the ID of the giveaway to end."
 | 
			
		||||
  args:
 | 
			
		||||
    - "ab3"
 | 
			
		||||
giveawaycancel:
 | 
			
		||||
  desc: "Cancels a giveaway. Specify the ID of the giveaway to cancel."
 | 
			
		||||
  desc: "Cancels a giveaway. Specify the ID of the giveaway to cancel. The winner will not be chosen."
 | 
			
		||||
  args:
 | 
			
		||||
    - "ab3"
 | 
			
		||||
giveawayreroll:
 | 
			
		||||
  desc: "Rerolls a giveaway. Specify the ID of the giveaway to reroll. The winner will not be chosen."
 | 
			
		||||
  desc: "Rerolls a giveaway. Specify the ID of the giveaway to reroll. This is only active within 24h after the giveaway has ended or until the bot restarts."
 | 
			
		||||
  args:
 | 
			
		||||
    - "cd3"
 | 
			
		||||
giveawaylist:
 | 
			
		||||
 
 | 
			
		||||
@@ -1075,5 +1075,6 @@
 | 
			
		||||
  "no_givaways": "There are no active giveaways on this server.",
 | 
			
		||||
  "giveaway_cancelled": "Giveaway cancelled.",
 | 
			
		||||
  "giveaway_starting": "Starting giveaway...",
 | 
			
		||||
  "winner": "Winner"
 | 
			
		||||
  "winner": "Winner",
 | 
			
		||||
  "giveaway_list": "List of active giveways",
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
dotnet ef migrations remove -c SqliteContext
 | 
			
		||||
dotnet ef migrations remove -c SqliteContext -f
 | 
			
		||||
dotnet ef migrations remove -c PostgreSqlContext -f
 | 
			
		||||
dotnet ef migrations remove -c MysqlContext -f
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user