Initial split of the modules

This commit is contained in:
Master Kwoth
2017-09-30 00:46:33 +02:00
parent cdc2c43913
commit 599245b1ca
499 changed files with 469 additions and 256 deletions
NadekoBot.Core
Common
Migrations
20161011200458_first.Designer.cs20161011200458_first.cs20161015005020_CurrencyTransaction.Designer.cs20161015005020_CurrencyTransaction.cs20161015102407_coc.Designer.cs20161015102407_coc.cs20161019055137_MuteRoleName.Designer.cs20161019055137_MuteRoleName.cs20161107213222_Cleverbot.Designer.cs20161107213222_Cleverbot.cs20161122100602_Greet and bye improved.Designer.cs20161122100602_Greet and bye improved.cs20161127233843_PokeGame.Designer.cs20161127233843_PokeGame.cs20161213025624_mutedusers.Designer.cs20161213025624_mutedusers.cs20161224032833_logsettings.Designer.cs20161224032833_logsettings.cs20170110111159_repeater-drop.Designer.cs20170110111159_repeater-drop.cs20170110111302_repeater-new.Designer.cs20170110111302_repeater-new.cs20170110180534_protection.Designer.cs20170110180534_protection.cs20170112185538_currency-modifications.Designer.cs20170112185538_currency-modifications.cs20170118202307_ok-error-colors.Designer.cs20170118202307_ok-error-colors.cs20170122044958_waifus.Designer.cs20170122044958_waifus.cs20170213164350_guild-timezone-and-locale.Designer.cs20170213164350_guild-timezone-and-locale.cs20170222162505_dateadded.Designer.cs20170222162505_dateadded.cs20170308033058_permsv2.Designer.cs20170308033058_permsv2.cs20170310210952_unmute-timers.Designer.cs20170310210952_unmute-timers.cs20170311054632_vcrole.Designer.cs20170311054632_vcrole.cs20170318190018_crad-and-crdm.Designer.cs20170318190018_crad-and-crdm.cs20170320090138_command-aliasing.Designer.cs20170320090138_command-aliasing.cs20170330000613_warning-commands.Designer.cs20170330000613_warning-commands.cs20170331093025_startup-commands.Designer.cs20170331093025_startup-commands.cs20170401161600_slowmode-whitelist.Designer.cs20170401161600_slowmode-whitelist.cs20170401205753_patreon-rewards.Designer.cs20170401205753_patreon-rewards.cs20170405161814_flower-shop.Designer.cs20170405161814_flower-shop.cs20170408162851_game-voice-channel.Designer.cs20170408162851_game-voice-channel.cs20170409193757_gmod-and-cmod.Designer.cs20170409193757_gmod-and-cmod.cs20170501103455_patreon-id.Designer.cs20170501103455_patreon-id.cs20170528001839_permissions-version.Designer.cs20170528001839_permissions-version.cs20170530033406_guild-prefixes.Designer.cs20170530033406_guild-prefixes.cs20170612094138_verbose-errors.Designer.cs20170612094138_verbose-errors.cs20170612234751_repeat time of day.Designer.cs20170612234751_repeat time of day.cs20170613231358_maxdropamount.Designer.cs20170613231358_maxdropamount.cs20170616154106_crstartswith.Designer.cs20170616154106_crstartswith.cs20170714021615_stream-role.Designer.cs20170714021615_stream-role.cs20170719023924_streamrole-kw-bl-wl.Designer.cs20170719023924_streamrole-kw-bl-wl.cs20170721004230_nsfw-blacklist.Designer.cs20170721004230_nsfw-blacklist.cs20170722074959_cr-ca.Designer.cs20170722074959_cr-ca.cs20170814044636_waifu-items.Designer.cs20170814044636_waifu-items.cs20170815222316_mute-time-antispam.Designer.cs20170815222316_mute-time-antispam.cs20170908230730_xp-and-clubs.Designer.cs20170908230730_xp-and-clubs.cs20170911200031_lastXpGain.Designer.cs20170911200031_lastXpGain.cs20170913022654_total-xp.Designer.cs20170913022654_total-xp.cs20170915034808_club-admins.Designer.cs20170915034808_club-admins.cs20170921185313_feeds.Designer.cs20170921185313_feeds.cs20170923002439_xprr-fix.Designer.cs20170923002439_xprr-fix.csMigrationQueries.csNadekoSqliteContextModelSnapshot.cs
Modules
NadekoBot.Core.csproj
Services
CommandHandler.csCurrencyService.cs
Database
DbService.csGreetSettingsService.csIBotConfigProvider.csIBotCredentials.csIDataCache.csIGoogleApiService.csIImagesService.csILocalization.csINService.csIStatsService.cs
Impl
LogSetup.csNadekoBot.csServiceProvider.csShardsCoordinator.cs
_Extensions
_libs
_strings
NadekoBot.Module.Searches
NadekoBot.Modules.CustomReactions
NadekoBot.Modules.Gambling
NadekoBot.Modules.Games
NadekoBot.Modules.Music
NadekoBot.Modules.Nsfw
NadekoBot.Modules.Pokemon
NadekoBot.Modules.Utility
NadekoBot.Modules.Xp
NadekoBot.sln
docs
src/NadekoBot

@@ -0,0 +1,296 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
namespace NadekoBot.Migrations
{
public partial class xpandclubs : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "XpMinutesTimeout",
table: "BotConfig",
nullable: false,
defaultValue: 5)
.Annotation("Sqlite:Autoincrement", true);
migrationBuilder.AddColumn<int>(
name: "XpPerMessage",
table: "BotConfig",
nullable: false,
defaultValue: 3)
.Annotation("Sqlite:Autoincrement", true);
migrationBuilder.CreateTable(
name: "Clubs",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
DateAdded = table.Column<DateTime>(nullable: true),
Discrim = table.Column<int>(nullable: false),
ImageUrl = table.Column<string>(nullable: true),
MinimumLevelReq = table.Column<int>(nullable: false),
Name = table.Column<string>(maxLength: 20, nullable: false),
OwnerId = table.Column<int>(nullable: false),
Xp = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Clubs", x => x.Id);
table.UniqueConstraint("AK_Clubs_Name_Discrim", x => new { x.Name, x.Discrim });
table.ForeignKey(
name: "FK_Clubs_DiscordUser_OwnerId",
column: x => x.OwnerId,
principalTable: "DiscordUser",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.Sql(MigrationQueries.UserClub);
migrationBuilder.AddColumn<DateTime>(
name: "LastLevelUp",
table: "DiscordUser",
nullable: false,
defaultValue: DateTime.UtcNow);
migrationBuilder.AddColumn<int>(
name: "NotifyOnLevelUp",
table: "DiscordUser",
nullable: false,
defaultValue: 0);
migrationBuilder.CreateTable(
name: "UserXpStats",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
AwardedXp = table.Column<int>(nullable: false),
DateAdded = table.Column<DateTime>(nullable: true),
GuildId = table.Column<ulong>(nullable: false),
LastLevelUp = table.Column<DateTime>(nullable: false, defaultValue: new DateTime(2017, 9, 9, 1, 7, 29, 858, DateTimeKind.Local)),
NotifyOnLevelUp = table.Column<int>(nullable: false),
UserId = table.Column<ulong>(nullable: false),
Xp = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_UserXpStats", x => x.Id);
});
migrationBuilder.CreateTable(
name: "XpSettings",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
DateAdded = table.Column<DateTime>(nullable: true),
GuildConfigId = table.Column<int>(nullable: false),
NotifyMessage = table.Column<string>(nullable: true),
ServerExcluded = table.Column<bool>(nullable: false),
XpRoleRewardExclusive = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_XpSettings", x => x.Id);
table.ForeignKey(
name: "FK_XpSettings_GuildConfigs_GuildConfigId",
column: x => x.GuildConfigId,
principalTable: "GuildConfigs",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClubApplicants",
columns: table => new
{
ClubId = table.Column<int>(nullable: false),
UserId = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClubApplicants", x => new { x.ClubId, x.UserId });
table.ForeignKey(
name: "FK_ClubApplicants_Clubs_ClubId",
column: x => x.ClubId,
principalTable: "Clubs",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ClubApplicants_DiscordUser_UserId",
column: x => x.UserId,
principalTable: "DiscordUser",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClubBans",
columns: table => new
{
ClubId = table.Column<int>(nullable: false),
UserId = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClubBans", x => new { x.ClubId, x.UserId });
table.ForeignKey(
name: "FK_ClubBans_Clubs_ClubId",
column: x => x.ClubId,
principalTable: "Clubs",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ClubBans_DiscordUser_UserId",
column: x => x.UserId,
principalTable: "DiscordUser",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ExcludedItem",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
DateAdded = table.Column<DateTime>(nullable: true),
ItemId = table.Column<ulong>(nullable: false),
ItemType = table.Column<int>(nullable: false),
XpSettingsId = table.Column<int>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ExcludedItem", x => x.Id);
table.ForeignKey(
name: "FK_ExcludedItem_XpSettings_XpSettingsId",
column: x => x.XpSettingsId,
principalTable: "XpSettings",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "XpRoleReward",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
DateAdded = table.Column<DateTime>(nullable: true),
Level = table.Column<int>(nullable: false),
RoleId = table.Column<ulong>(nullable: false),
XpSettingsId = table.Column<int>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_XpRoleReward", x => x.Id);
table.UniqueConstraint("AK_XpRoleReward_Level", x => x.Level);
table.ForeignKey(
name: "FK_XpRoleReward_XpSettings_XpSettingsId",
column: x => x.XpSettingsId,
principalTable: "XpSettings",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_DiscordUser_ClubId",
table: "DiscordUser",
column: "ClubId");
migrationBuilder.CreateIndex(
name: "IX_ClubApplicants_UserId",
table: "ClubApplicants",
column: "UserId");
migrationBuilder.CreateIndex(
name: "IX_ClubBans_UserId",
table: "ClubBans",
column: "UserId");
migrationBuilder.CreateIndex(
name: "IX_Clubs_OwnerId",
table: "Clubs",
column: "OwnerId",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_ExcludedItem_XpSettingsId",
table: "ExcludedItem",
column: "XpSettingsId");
migrationBuilder.CreateIndex(
name: "IX_UserXpStats_UserId_GuildId",
table: "UserXpStats",
columns: new[] { "UserId", "GuildId" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_XpRoleReward_XpSettingsId",
table: "XpRoleReward",
column: "XpSettingsId");
migrationBuilder.CreateIndex(
name: "IX_XpSettings_GuildConfigId",
table: "XpSettings",
column: "GuildConfigId",
unique: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_DiscordUser_Clubs_ClubId",
table: "DiscordUser");
migrationBuilder.DropTable(
name: "ClubApplicants");
migrationBuilder.DropTable(
name: "ClubBans");
migrationBuilder.DropTable(
name: "ExcludedItem");
migrationBuilder.DropTable(
name: "UserXpStats");
migrationBuilder.DropTable(
name: "XpRoleReward");
migrationBuilder.DropTable(
name: "Clubs");
migrationBuilder.DropTable(
name: "XpSettings");
migrationBuilder.DropIndex(
name: "IX_DiscordUser_ClubId",
table: "DiscordUser");
migrationBuilder.DropColumn(
name: "ClubId",
table: "DiscordUser");
migrationBuilder.DropColumn(
name: "LastLevelUp",
table: "DiscordUser");
migrationBuilder.DropColumn(
name: "NotifyOnLevelUp",
table: "DiscordUser");
migrationBuilder.DropColumn(
name: "XpMinutesTimeout",
table: "BotConfig");
migrationBuilder.DropColumn(
name: "XpPerMessage",
table: "BotConfig");
}
}
}