diff --git a/NadekoBot.sln b/NadekoBot.sln
index e844576d..7b8981b8 100644
--- a/NadekoBot.sln
+++ b/NadekoBot.sln
@@ -16,8 +16,6 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Discord.Net", "discord.net\
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Discord.Net.Commands", "discord.net\src\Discord.Net.Commands\Discord.Net.Commands.xproj", "{078DD7E6-943D-4D09-AFC2-D2BA58B76C9C}"
EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "tests", "src\tests\tests.xproj", "{14CBADA0-971C-44E3-B331-C7D01DD74F0B}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -43,18 +41,11 @@ Global
{078DD7E6-943D-4D09-AFC2-D2BA58B76C9C}.GlobalNadeko|Any CPU.Build.0 = GlobalNadeko|Any CPU
{078DD7E6-943D-4D09-AFC2-D2BA58B76C9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{078DD7E6-943D-4D09-AFC2-D2BA58B76C9C}.Release|Any CPU.Build.0 = Release|Any CPU
- {14CBADA0-971C-44E3-B331-C7D01DD74F0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {14CBADA0-971C-44E3-B331-C7D01DD74F0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {14CBADA0-971C-44E3-B331-C7D01DD74F0B}.GlobalNadeko|Any CPU.ActiveCfg = GlobalNadeko|Any CPU
- {14CBADA0-971C-44E3-B331-C7D01DD74F0B}.GlobalNadeko|Any CPU.Build.0 = GlobalNadeko|Any CPU
- {14CBADA0-971C-44E3-B331-C7D01DD74F0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {14CBADA0-971C-44E3-B331-C7D01DD74F0B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{45EC1473-C678-4857-A544-07DFE0D0B478} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2}
- {14CBADA0-971C-44E3-B331-C7D01DD74F0B} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2}
EndGlobalSection
EndGlobal
diff --git a/docs/Commands List.md b/docs/Commands List.md
index 70dd28a0..e889dcac 100644
--- a/docs/Commands List.md
+++ b/docs/Commands List.md
@@ -34,7 +34,7 @@ Command and aliases | Description | Usage
`.savechat` | Saves a number of messages to a text file and sends it to you. | `.savechat 150` **Bot owner only.**
`.mentionrole` `.menro` | Mentions every person from the provided role or roles (separated by a ',') on this server. Requires you to have mention everyone permission. | `.menro RoleName` **Requires MentionEveryone server permission.**
`.donators` | List of lovely people who donated to keep this project alive. | `.donators`
-`.donadd` | Add a donator to the database. **Kwoth Only** | `.donadd Donate Amount` **Bot owner only.**
+`.donadd` | Add a donator to the database. | `.donadd Donate Amount` **Bot owner only.**
`.autoassignrole` `.aar` | Automaticaly assigns a specified role to every user who joins the server. | `.aar` to disable, `.aar Role Name` to enable **Requires ManageRoles server permission.**
`.scsc` | Starts an instance of cross server channel. You will get a token as a DM that other people will use to tune in to the same instance. | `.scsc` **Bot owner only.**
`.jcsc` | Joins current channel to an instance of cross server channel using the token. | `.jcsc TokenHere` **Requires ManageServer server permission.**
@@ -53,7 +53,7 @@ Command and aliases | Description | Usage
`.listplaying` `.lipl` | Lists all playing statuses with their corresponding number. | `.lipl` **Bot owner only.**
`.removeplaying` `.rmpl` `.repl` | Removes a playing string on a given number. | `.rmpl` **Bot owner only.**
`.slowmode` | Toggles slow mode. When ON, users will be able to send only 1 message every 5 seconds. | `.slowmode` **Requires ManageMessages server permission.**
-`.asar` | Adds a role, or list of roles separated by whitespace(use quotations for multiword roles) to the list of self-assignable roles. | `.asar Gamer` **Requires ManageRoles server permission.**
+`.asar` | Adds a role to the list of self-assignable roles. | `.asar Gamer` **Requires ManageRoles server permission.**
`.rsar` | Removes a specified role from the list of self-assignable roles. | `.rsar` **Requires ManageRoles server permission.**
`.lsar` | Lists all self-assignable roles. | `.lsar`
`.togglexclsar` `.tesar` | Toggles whether the self-assigned roles are exclusive. (So that any person can have only one of the self assignable roles) | `.tesar` **Requires ManageRoles server permission.**
@@ -78,38 +78,39 @@ Command and aliases | Description | Usage
`,startwar` `,sw` | Starts a war with a given number. | `,sw 15`
`,listwar` `,lw` | Shows the active war claims by a number. Shows all wars in a short way if no number is specified. | `,lw [war_number] or ,lw`
`,claim` `,call` `,c` | Claims a certain base from a certain war. You can supply a name in the third optional argument to claim in someone else's place. | `,call [war_number] [base_number] [optional_other_name]`
-`,claimfinish1` `,cf1` | Finish your claim with 1 star if you destroyed a base. First argument is the war number, optional second argument finishes for someone else. | `,cf1 2 SomeGirl`
-`,claimfinish2` `,cf2` | Finish your claim with 2 stars if you destroyed a base. First argument is the war number, optional second argument finishes for someone else. | `,cf2 1 SomeGuy`
-`,claimfinish` `,cf` | Finish your claim with 3 stars if you destroyed a base. First argument is the war number, optional second argument finishes for someone else. | `,cf 1 Someone`
+`,claimfinish1` `,cf1` | Finish your claim with 1 star if you destroyed a base. First argument is the war number, optional second argument is a base number if you want to finish for someone else. | `,cf1 1` or `,cf1 1 5`
+`,claimfinish2` `,cf2` | Finish your claim with 2 stars if you destroyed a base. First argument is the war number, optional second argument is a base number if you want to finish for someone else. | `,cf2 1` or `,cf2 1 5`
+`,claimfinish` `,cf` | Finish your claim with 3 stars if you destroyed a base. First argument is the war number, optional second argument is a base number if you want to finish for someone else. | `,cf 1` or `,cf 1 5`
`,endwar` `,ew` | Ends the war with a given index. | `,ew [war_number]`
`,unclaim` `,ucall` `,uc` | Removes your claim from a certain war. Optional second argument denotes a person in whose place to unclaim | `,uc [war_number] [optional_other_name]`
### CustomReactions
Command and aliases | Description | Usage
----------------|--------------|-------
-`#addcustreact` `#acr` | Add a custom reaction with a trigger and a response. Running this command in server requires Administration permission. Running this command in DM is Bot Owner only and adds a new global custom reaction. Guide here: | `.acr "hello" Hi there %user%`
-`#listcustreact` `#lcr` | Lists global or server custom reactions (15 commands per page). Running the command in DM will list global custom reactions, while running it in server will list that server's custom reactions. | `.lcr 1`
-`#delcustreact` `#dcr` | Deletes a custom reaction on a specific index. If ran in DM, it is bot owner only and deletes a global custom reaction. If ran in a server, it requires Administration priviledges and removes server custom reaction. | `.dcr 5`
+`.addcustreact` `.acr` | Add a custom reaction with a trigger and a response. Running this command in server requires Administration permission. Running this command in DM is Bot Owner only and adds a new global custom reaction. Guide here: | `.acr "hello" Hi there %user%`
+`.listcustreact` `.lcr` | Lists global or server custom reactions (15 commands per page). Running the command in DM will list global custom reactions, while running it in server will list that server's custom reactions. | `.lcr 1`
+`.showcustreact` `.scr` | Shows a custom reaction's response on a given ID. | `.scr 1`
+`.delcustreact` `.dcr` | Deletes a custom reaction on a specific index. If ran in DM, it is bot owner only and deletes a global custom reaction. If ran in a server, it requires Administration priviledges and removes server custom reaction. | `.dcr 5`
### Gambling
Command and aliases | Description | Usage
----------------|--------------|-------
-`xraffle` | Prints a name and ID of a random user from the online list from the (optional) role. | `$raffle` or `$raffle RoleName`
-`xcash` `x$$` | Check how much NadekoFlowers a person has. (Defaults to yourself) | `$$$` or `$$$ @SomeGuy`
-`xgive` | Give someone a certain amount of currency. | `$give 1 "@SomeGuy"`
-`xaward` | Awards someone a certain amount of currency. | `$award 100 @person` **Bot owner only.**
-`xtake` | Takes a certain amount of flowers from someone. | `$take 1 "@someguy"` **Bot owner only.**
-`xbetroll` `xbr` | Bets a certain amount of NadekoFlowers and rolls a dice. Rolling over 66 yields x2 flowers, over 90 - x3 and 100 x10. | `$br 5`
-`xleaderboard` `xlb` | Displays bot currency leaderboard. | `$lb`
-`xrace` | Starts a new animal race. | `$race`
-`xjoinrace` `xjr` | Joins a new race. You can specify an amount of flowers for betting (optional). You will get YourBet*(participants-1) back if you win. | `$jr` or `$jr 5`
-`xroll` | Rolls 0-100. If you supply a number [x] it rolls up to 30 normal dice. If you split 2 numbers with letter d (xdy) it will roll x dice from 1 to y. | `$roll` or `$roll 7` or `$roll 3d5`
-`xrolluo` | Rolls X normal dice (up to 30) unordered. If you split 2 numbers with letter d (xdy) it will roll x dice from 1 to y. | `$rolluo` or `$rolluo 7` or `$rolluo 3d5`
-`xnroll` | Rolls in a given range. | `$nroll 5` (rolls 0-5) or `$nroll 5-15`
-`xdraw` | Draws a card from the deck.If you supply number X, she draws up to 5 cards from the deck. | `$draw` or `$draw 5`
-`xshuffle` `xsh` | Reshuffles all cards back into the deck. | `$sh`
-`xflip` | Flips coin(s) - heads or tails, and shows an image. | `$flip` or `$flip 3`
-`xbetflip` `xbf` | Bet to guess will the result be heads or tails. Guessing awards you double flowers you've bet. | `$bf 5 heads` or `$bf 3 t`
+`$raffle` | Prints a name and ID of a random user from the online list from the (optional) role. | `$raffle` or `$raffle RoleName`
+`$cash` `$$$` | Check how much NadekoFlowers a person has. (Defaults to yourself) | `$$$` or `$$$ @SomeGuy`
+`$give` | Give someone a certain amount of currency. | `$give 1 "@SomeGuy"`
+`$award` | Awards someone a certain amount of currency. | `$award 100 @person` **Bot owner only.**
+`$take` | Takes a certain amount of flowers from someone. | `$take 1 "@someguy"` **Bot owner only.**
+`$betroll` `$br` | Bets a certain amount of NadekoFlowers and rolls a dice. Rolling over 66 yields x2 flowers, over 90 - x3 and 100 x10. | `$br 5`
+`$leaderboard` `$lb` | Displays bot currency leaderboard. | `$lb`
+`$race` | Starts a new animal race. | `$race`
+`$joinrace` `$jr` | Joins a new race. You can specify an amount of flowers for betting (optional). You will get YourBet*(participants-1) back if you win. | `$jr` or `$jr 5`
+`$roll` | Rolls 0-100. If you supply a number [x] it rolls up to 30 normal dice. If you split 2 numbers with letter d (xdy) it will roll x dice from 1 to y. | `$roll` or `$roll 7` or `$roll 3d5`
+`$rolluo` | Rolls X normal dice (up to 30) unordered. If you split 2 numbers with letter d (xdy) it will roll x dice from 1 to y. | `$rolluo` or `$rolluo 7` or `$rolluo 3d5`
+`$nroll` | Rolls in a given range. | `$nroll 5` (rolls 0-5) or `$nroll 5-15`
+`$draw` | Draws a card from the deck.If you supply number X, she draws up to 5 cards from the deck. | `$draw` or `$draw 5`
+`$shuffle` `$sh` | Reshuffles all cards back into the deck. | `$sh`
+`$flip` | Flips coin(s) - heads or tails, and shows an image. | `$flip` or `$flip 3`
+`$betflip` `$bf` | Bet to guess will the result be heads or tails. Guessing awards you double flowers you've bet. | `$bf 5 heads` or `$bf 3 t`
### Games
Command and aliases | Description | Usage
@@ -223,7 +224,7 @@ Command and aliases | Description | Usage
----------------|--------------|-------
`~weather` `~we` | Shows weather data for a specified city and a country. BOTH ARE REQUIRED. Use country abbrevations. | `~we Moscow RF`
`~youtube` `~yt` | Searches youtubes and shows the first result | `~yt query`
-`~imdb` | Queries imdb for movies or series, show first result. | `~imdb Batman vs Superman`
+`~imdb` `~omdb` | Queries omdb for movies or series, show first result. | `~imdb Batman vs Superman`
`~randomcat` `~meow` | Shows a random cat image. | `~meow`
`~randomdog` `~woof` | Shows a random dog image. | `~woof`
`~img` `~i` | Pulls the first image found using a search parameter. Use ~ir for different results. | `~i cute kitten`
@@ -257,7 +258,7 @@ Command and aliases | Description | Usage
`~osub` | Shows information about an osu beatmap. | `~osub https://osu.ppy.sh/s/127712`
`~osu5` | Displays a user's top 5 plays. | `~osu5 Name`
`~pokemon` `~poke` | Searches for a pokemon. | `~poke Sylveon`
-`~pokemonability` `~pokeab` | Searches for a pokemon ability. | `~pokeab "water gun"`
+`~pokemonability` `~pokeab` | Searches for a pokemon ability. | `~pokeab overgrow`
`~hitbox` `~hb` | Notifies this channel when a certain user starts streaming. | `~hitbox SomeStreamer` **Requires ManageMessages server permission.**
`~twitch` `~tw` | Notifies this channel when a certain user starts streaming. | `~twitch SomeStreamer` **Requires ManageMessages server permission.**
`~beam` `~bm` | Notifies this channel when a certain user starts streaming. | `~beam SomeStreamer` **Requires ManageMessages server permission.**
@@ -274,7 +275,7 @@ Command and aliases | Description | Usage
`.userid` `.uid` | Shows user ID. | `.uid` or `.uid "@SomeGuy"`
`.channelid` `.cid` | Shows current channel ID. | `.cid`
`.serverid` `.sid` | Shows current server ID. | `.sid`
-`.roles` | List all roles on this server or a single user if specified. | `.roles`
+`.roles` | List roles on this server or a roles of a specific user if specified. Paginated. 20 roles per page. | `.roles 2` or `.roles @Someone`
`.channeltopic` `.ct` | Sends current channel's topic as a message. | `.ct`
`.stats` | Shows some basic stats for Nadeko. | `.stats`
`.showemojis` `.se` | Shows a name and a link to every SPECIAL emoji in the message. | `.se A message full of SPECIALemojis`
diff --git a/docs/Custom Reactions.md b/docs/Custom Reactions.md
index d2e6f40d..1f2d4600 100644
--- a/docs/Custom Reactions.md
+++ b/docs/Custom Reactions.md
@@ -35,7 +35,6 @@ There are currently three different placeholders which we will look at, with mor
|`%mention`|The `%mention%` placeholder is triggered when you type `@BotName` - It's important to note that if you've given the bot a custom nickname, this trigger won't work!|```.acr "Hello %mention%" I, %mention%, also say hello!```|Input: "Hello @BotName" Output: "I, @BotName, also say hello!"|
|`%user%`|The `%user%` placeholder mentions the person who said the command|`.acr "Who am I?" You are %user%!`|Input: "Who am I?" Output: "You are @Username!"|
|`%rng%`|The `%rng%` placeholder generates a random number between 0 and 10|`.acr "Random number" %rng%`|Input: "Random number" Output: "2"|
-
-[//]: # (|`%target%`|The `%target%` placeholder is used to make Nadeko Mention another person or phrase|`.acr "Say this: " %target%|Input: "Say this: I, @BotName, am a parrot!". Output: "I, @BotName, am a parrot!".|)
+|`%target%`|The `%target%` placeholder is used to make Nadeko Mention another person or phrase, it is only supported as part of the response|`.acr "Say this: " %target%`|Input: "Say this: I, @BotName, am a parrot!". Output: "I, @BotName, am a parrot!".|
Thanks to Nekai for being creative. <3
diff --git a/src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.Designer.cs b/src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.Designer.cs
new file mode 100644
index 00000000..09af6235
--- /dev/null
+++ b/src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.Designer.cs
@@ -0,0 +1,775 @@
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using NadekoBot.Services.Database.Impl;
+
+namespace NadekoBot.Migrations
+{
+ [DbContext(typeof(NadekoSqliteContext))]
+ [Migration("20161015005020_CurrencyTransaction")]
+ partial class CurrencyTransaction
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+ modelBuilder
+ .HasAnnotation("ProductVersion", "1.0.0-rtm-21431");
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BotConfigId");
+
+ b.Property("ItemId");
+
+ b.Property("Type");
+
+ b.HasKey("Id");
+
+ b.HasIndex("BotConfigId");
+
+ b.ToTable("BlacklistItem");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BufferSize");
+
+ b.Property("CurrencyGenerationChance");
+
+ b.Property("CurrencyGenerationCooldown");
+
+ b.Property("CurrencyName");
+
+ b.Property("CurrencyPluralName");
+
+ b.Property("CurrencySign");
+
+ b.Property("DMHelpString");
+
+ b.Property("ForwardMessages");
+
+ b.Property("ForwardToAllOwners");
+
+ b.Property("HelpString");
+
+ b.Property("MigrationVersion");
+
+ b.Property("RemindMessageFormat");
+
+ b.Property("RotatingStatuses");
+
+ b.HasKey("Id");
+
+ b.ToTable("BotConfig");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BaseDestroyed");
+
+ b.Property("CallUser");
+
+ b.Property("ClashWarId");
+
+ b.Property("Stars");
+
+ b.Property("TimeAdded");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClashWarId");
+
+ b.ToTable("ClashCallers");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ChannelId");
+
+ b.Property("EnemyClan");
+
+ b.Property("GuildId");
+
+ b.Property("Size");
+
+ b.Property("StartedAt");
+
+ b.Property("WarState");
+
+ b.HasKey("Id");
+
+ b.ToTable("ClashOfClans");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("CommandName");
+
+ b.Property("GuildConfigId");
+
+ b.Property("Seconds");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GuildConfigId");
+
+ b.ToTable("CommandCooldown");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("InternalTrigger");
+
+ b.Property("Modifier");
+
+ b.Property("UnitType");
+
+ b.HasKey("Id");
+
+ b.ToTable("ConversionUnits");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Amount");
+
+ b.Property("UserId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId")
+ .IsUnique();
+
+ b.ToTable("Currency");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Amount");
+
+ b.Property("Reason");
+
+ b.Property("UserId");
+
+ b.HasKey("Id");
+
+ b.ToTable("CurrencyTransactions");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("GuildId");
+
+ b.Property("IsRegex");
+
+ b.Property("OwnerOnly");
+
+ b.Property("Response");
+
+ b.Property("Trigger");
+
+ b.HasKey("Id");
+
+ b.ToTable("CustomReactions");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Amount");
+
+ b.Property("Name");
+
+ b.Property("UserId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId")
+ .IsUnique();
+
+ b.ToTable("Donators");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BotConfigId");
+
+ b.Property("Text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("BotConfigId");
+
+ b.ToTable("EightBallResponses");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ChannelId");
+
+ b.Property("GuildConfigId");
+
+ b.Property("GuildConfigId1");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GuildConfigId");
+
+ b.HasIndex("GuildConfigId1");
+
+ b.ToTable("FilterChannelId");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("GuildConfigId");
+
+ b.Property("Word");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GuildConfigId");
+
+ b.ToTable("FilteredWord");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ChannelId");
+
+ b.Property("GuildConfigId");
+
+ b.Property("GuildId");
+
+ b.Property("Type");
+
+ b.Property("Username");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GuildConfigId");
+
+ b.ToTable("FollowedStream");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ChannelId");
+
+ b.Property("GuildConfigId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GuildConfigId");
+
+ b.ToTable("GCChannelId");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AutoAssignRoleId");
+
+ b.Property("AutoDeleteByeMessages");
+
+ b.Property("AutoDeleteGreetMessages");
+
+ b.Property("AutoDeleteGreetMessagesTimer");
+
+ b.Property("AutoDeleteSelfAssignedRoleMessages");
+
+ b.Property("ByeMessageChannelId");
+
+ b.Property("ChannelByeMessageText");
+
+ b.Property("ChannelGreetMessageText");
+
+ b.Property("DefaultMusicVolume");
+
+ b.Property("DeleteMessageOnCommand");
+
+ b.Property("DmGreetMessageText");
+
+ b.Property("ExclusiveSelfAssignedRoles");
+
+ b.Property("FilterInvites");
+
+ b.Property("FilterWords");
+
+ b.Property("GreetMessageChannelId");
+
+ b.Property("GuildId");
+
+ b.Property("LogSettingId");
+
+ b.Property("PermissionRole");
+
+ b.Property("RootPermissionId");
+
+ b.Property("SendChannelByeMessage");
+
+ b.Property("SendChannelGreetMessage");
+
+ b.Property("SendDmGreetMessage");
+
+ b.Property("VerbosePermissions");
+
+ b.Property("VoicePlusTextEnabled");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GuildId")
+ .IsUnique();
+
+ b.HasIndex("LogSettingId");
+
+ b.HasIndex("RootPermissionId");
+
+ b.ToTable("GuildConfigs");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ChannelId");
+
+ b.Property("LogSettingId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("LogSettingId");
+
+ b.ToTable("IgnoredLogChannels");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ChannelId");
+
+ b.Property("LogSettingId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("LogSettingId");
+
+ b.ToTable("IgnoredVoicePresenceCHannels");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ChannelCreated");
+
+ b.Property("ChannelDestroyed");
+
+ b.Property("ChannelId");
+
+ b.Property("ChannelUpdated");
+
+ b.Property("IsLogging");
+
+ b.Property("LogUserPresence");
+
+ b.Property("LogVoicePresence");
+
+ b.Property("MessageDeleted");
+
+ b.Property("MessageUpdated");
+
+ b.Property("UserBanned");
+
+ b.Property("UserJoined");
+
+ b.Property("UserLeft");
+
+ b.Property("UserPresenceChannelId");
+
+ b.Property("UserUnbanned");
+
+ b.Property("UserUpdated");
+
+ b.Property("VoicePresenceChannelId");
+
+ b.HasKey("Id");
+
+ b.ToTable("LogSettings");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BotConfigId");
+
+ b.Property("ModuleName");
+
+ b.Property("Prefix");
+
+ b.HasKey("Id");
+
+ b.HasIndex("BotConfigId");
+
+ b.ToTable("ModulePrefixes");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Author");
+
+ b.Property("AuthorId");
+
+ b.Property("Name");
+
+ b.HasKey("Id");
+
+ b.ToTable("MusicPlaylists");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("NextId");
+
+ b.Property("PrimaryTarget");
+
+ b.Property("PrimaryTargetId");
+
+ b.Property("SecondaryTarget");
+
+ b.Property("SecondaryTargetName");
+
+ b.Property("State");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NextId")
+ .IsUnique();
+
+ b.ToTable("Permission");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BotConfigId");
+
+ b.Property("Status");
+
+ b.HasKey("Id");
+
+ b.HasIndex("BotConfigId");
+
+ b.ToTable("PlayingStatus");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("MusicPlaylistId");
+
+ b.Property("Provider");
+
+ b.Property("ProviderType");
+
+ b.Property("Query");
+
+ b.Property("Title");
+
+ b.Property("Uri");
+
+ b.HasKey("Id");
+
+ b.HasIndex("MusicPlaylistId");
+
+ b.ToTable("PlaylistSong");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AuthorId");
+
+ b.Property("AuthorName")
+ .IsRequired();
+
+ b.Property("GuildId");
+
+ b.Property("Keyword")
+ .IsRequired();
+
+ b.Property("Text")
+ .IsRequired();
+
+ b.HasKey("Id");
+
+ b.ToTable("Quotes");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BotConfigId");
+
+ b.Property("Icon");
+
+ b.Property("Name");
+
+ b.HasKey("Id");
+
+ b.HasIndex("BotConfigId");
+
+ b.ToTable("RaceAnimals");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ChannelId");
+
+ b.Property("IsPrivate");
+
+ b.Property("Message");
+
+ b.Property("ServerId");
+
+ b.Property("UserId");
+
+ b.Property("When");
+
+ b.HasKey("Id");
+
+ b.ToTable("Reminders");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.Repeater", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ChannelId");
+
+ b.Property("GuildId");
+
+ b.Property("Interval");
+
+ b.Property("Message");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ChannelId")
+ .IsUnique();
+
+ b.ToTable("Repeaters");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("GuildId");
+
+ b.Property("RoleId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GuildId", "RoleId")
+ .IsUnique();
+
+ b.ToTable("SelfAssignableRoles");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b =>
+ {
+ b.HasOne("NadekoBot.Services.Database.Models.BotConfig")
+ .WithMany("Blacklist")
+ .HasForeignKey("BotConfigId");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b =>
+ {
+ b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar")
+ .WithMany("Bases")
+ .HasForeignKey("ClashWarId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b =>
+ {
+ b.HasOne("NadekoBot.Services.Database.Models.GuildConfig")
+ .WithMany("CommandCooldowns")
+ .HasForeignKey("GuildConfigId");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b =>
+ {
+ b.HasOne("NadekoBot.Services.Database.Models.BotConfig")
+ .WithMany("EightBallResponses")
+ .HasForeignKey("BotConfigId");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b =>
+ {
+ b.HasOne("NadekoBot.Services.Database.Models.GuildConfig")
+ .WithMany("FilterInvitesChannelIds")
+ .HasForeignKey("GuildConfigId");
+
+ b.HasOne("NadekoBot.Services.Database.Models.GuildConfig")
+ .WithMany("FilterWordsChannelIds")
+ .HasForeignKey("GuildConfigId1");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
+ {
+ b.HasOne("NadekoBot.Services.Database.Models.GuildConfig")
+ .WithMany("FilteredWords")
+ .HasForeignKey("GuildConfigId");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b =>
+ {
+ b.HasOne("NadekoBot.Services.Database.Models.GuildConfig")
+ .WithMany("FollowedStreams")
+ .HasForeignKey("GuildConfigId");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
+ {
+ b.HasOne("NadekoBot.Services.Database.Models.GuildConfig")
+ .WithMany("GenerateCurrencyChannelIds")
+ .HasForeignKey("GuildConfigId");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b =>
+ {
+ b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting")
+ .WithMany()
+ .HasForeignKey("LogSettingId");
+
+ b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission")
+ .WithMany()
+ .HasForeignKey("RootPermissionId");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b =>
+ {
+ b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting")
+ .WithMany("IgnoredChannels")
+ .HasForeignKey("LogSettingId");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b =>
+ {
+ b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting")
+ .WithMany("IgnoredVoicePresenceChannelIds")
+ .HasForeignKey("LogSettingId");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b =>
+ {
+ b.HasOne("NadekoBot.Services.Database.Models.BotConfig")
+ .WithMany("ModulePrefixes")
+ .HasForeignKey("BotConfigId");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b =>
+ {
+ b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next")
+ .WithOne("Previous")
+ .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b =>
+ {
+ b.HasOne("NadekoBot.Services.Database.Models.BotConfig")
+ .WithMany("RotatingStatusMessages")
+ .HasForeignKey("BotConfigId");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b =>
+ {
+ b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist")
+ .WithMany("Songs")
+ .HasForeignKey("MusicPlaylistId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b =>
+ {
+ b.HasOne("NadekoBot.Services.Database.Models.BotConfig")
+ .WithMany("RaceAnimals")
+ .HasForeignKey("BotConfigId");
+ });
+ }
+ }
+}
diff --git a/src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.cs b/src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.cs
new file mode 100644
index 00000000..5d0b61d4
--- /dev/null
+++ b/src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+namespace NadekoBot.Migrations
+{
+ public partial class CurrencyTransaction : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "CurrencyTransactions",
+ columns: table => new
+ {
+ Id = table.Column(nullable: false)
+ .Annotation("Autoincrement", true),
+ Amount = table.Column(nullable: false),
+ Reason = table.Column(nullable: true),
+ UserId = table.Column(nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_CurrencyTransactions", x => x.Id);
+ });
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "CurrencyTransactions");
+ }
+ }
+}
diff --git a/src/NadekoBot/Migrations/20161015102407_coc.Designer.cs b/src/NadekoBot/Migrations/20161015102407_coc.Designer.cs
new file mode 100644
index 00000000..f05d500c
--- /dev/null
+++ b/src/NadekoBot/Migrations/20161015102407_coc.Designer.cs
@@ -0,0 +1,777 @@
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using NadekoBot.Services.Database.Impl;
+
+namespace NadekoBot.Migrations
+{
+ [DbContext(typeof(NadekoSqliteContext))]
+ [Migration("20161015102407_coc")]
+ partial class coc
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+ modelBuilder
+ .HasAnnotation("ProductVersion", "1.0.0-rtm-21431");
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BotConfigId");
+
+ b.Property("ItemId");
+
+ b.Property("Type");
+
+ b.HasKey("Id");
+
+ b.HasIndex("BotConfigId");
+
+ b.ToTable("BlacklistItem");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BufferSize");
+
+ b.Property("CurrencyGenerationChance");
+
+ b.Property("CurrencyGenerationCooldown");
+
+ b.Property("CurrencyName");
+
+ b.Property("CurrencyPluralName");
+
+ b.Property("CurrencySign");
+
+ b.Property("DMHelpString");
+
+ b.Property("ForwardMessages");
+
+ b.Property("ForwardToAllOwners");
+
+ b.Property("HelpString");
+
+ b.Property("MigrationVersion");
+
+ b.Property("RemindMessageFormat");
+
+ b.Property("RotatingStatuses");
+
+ b.HasKey("Id");
+
+ b.ToTable("BotConfig");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BaseDestroyed");
+
+ b.Property("CallUser");
+
+ b.Property("ClashWarId");
+
+ b.Property("SequenceNumber");
+
+ b.Property("Stars");
+
+ b.Property("TimeAdded");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClashWarId");
+
+ b.ToTable("ClashCallers");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ChannelId");
+
+ b.Property("EnemyClan");
+
+ b.Property("GuildId");
+
+ b.Property("Size");
+
+ b.Property("StartedAt");
+
+ b.Property("WarState");
+
+ b.HasKey("Id");
+
+ b.ToTable("ClashOfClans");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("CommandName");
+
+ b.Property("GuildConfigId");
+
+ b.Property("Seconds");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GuildConfigId");
+
+ b.ToTable("CommandCooldown");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("InternalTrigger");
+
+ b.Property("Modifier");
+
+ b.Property("UnitType");
+
+ b.HasKey("Id");
+
+ b.ToTable("ConversionUnits");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Amount");
+
+ b.Property("UserId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId")
+ .IsUnique();
+
+ b.ToTable("Currency");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Amount");
+
+ b.Property("Reason");
+
+ b.Property("UserId");
+
+ b.HasKey("Id");
+
+ b.ToTable("CurrencyTransactions");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("GuildId");
+
+ b.Property("IsRegex");
+
+ b.Property("OwnerOnly");
+
+ b.Property("Response");
+
+ b.Property("Trigger");
+
+ b.HasKey("Id");
+
+ b.ToTable("CustomReactions");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Amount");
+
+ b.Property("Name");
+
+ b.Property("UserId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId")
+ .IsUnique();
+
+ b.ToTable("Donators");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BotConfigId");
+
+ b.Property("Text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("BotConfigId");
+
+ b.ToTable("EightBallResponses");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ChannelId");
+
+ b.Property("GuildConfigId");
+
+ b.Property("GuildConfigId1");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GuildConfigId");
+
+ b.HasIndex("GuildConfigId1");
+
+ b.ToTable("FilterChannelId");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("GuildConfigId");
+
+ b.Property("Word");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GuildConfigId");
+
+ b.ToTable("FilteredWord");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ChannelId");
+
+ b.Property("GuildConfigId");
+
+ b.Property("GuildId");
+
+ b.Property("Type");
+
+ b.Property("Username");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GuildConfigId");
+
+ b.ToTable("FollowedStream");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ChannelId");
+
+ b.Property("GuildConfigId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GuildConfigId");
+
+ b.ToTable("GCChannelId");
+ });
+
+ modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property