From 5cdb41b65f333e9233a36febb2841ed263babe6d Mon Sep 17 00:00:00 2001 From: Kwoth Date: Wed, 22 Feb 2017 18:16:05 +0100 Subject: [PATCH] A lot more localization, cleanup, inole improved and dateadded is not a field in all database models --- .../20170222162505_dateadded.Designer.cs | 1171 +++++++++++++++++ .../Migrations/20170222162505_dateadded.cs | 357 +++++ .../NadekoSqliteContextModelSnapshot.cs | 76 ++ .../Modules/Games/Commands/Acropobia.cs | 5 +- .../Games/Commands/CleverBotCommands.cs | 2 +- .../Games/Commands/PlantAndPickCommands.cs | 4 +- .../Modules/Games/Commands/TicTacToe.cs | 9 - src/NadekoBot/Modules/Games/Games.cs | 33 +- src/NadekoBot/Modules/Utility/Utility.cs | 119 +- .../Resources/CommandStrings.Designer.cs | 4 +- src/NadekoBot/Resources/CommandStrings.resx | 4 +- .../Resources/ResponseStrings.Designer.cs | 301 +++++ src/NadekoBot/Resources/ResponseStrings.resx | 104 ++ .../Services/Database/Models/DbEntity.cs | 2 +- 14 files changed, 2101 insertions(+), 90 deletions(-) create mode 100644 src/NadekoBot/Migrations/20170222162505_dateadded.Designer.cs create mode 100644 src/NadekoBot/Migrations/20170222162505_dateadded.cs diff --git a/src/NadekoBot/Migrations/20170222162505_dateadded.Designer.cs b/src/NadekoBot/Migrations/20170222162505_dateadded.Designer.cs new file mode 100644 index 00000000..89102dc7 --- /dev/null +++ b/src/NadekoBot/Migrations/20170222162505_dateadded.Designer.cs @@ -0,0 +1,1171 @@ +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using NadekoBot.Services.Database; +using NadekoBot.Services.Database.Models; +using NadekoBot.Modules.Music.Classes; + +namespace NadekoBot.Migrations +{ + [DbContext(typeof(NadekoContext))] + [Migration("20170222162505_dateadded")] + partial class dateadded + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { + modelBuilder + .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Action"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Seconds"); + + b.Property("UserThreshold"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("AntiRaidSetting"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AntiSpamSettingId"); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.HasKey("Id"); + + b.HasIndex("AntiSpamSettingId"); + + b.ToTable("AntiSpamIgnore"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Action"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("MessageThreshold"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("AntiSpamSetting"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + 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("BetflipMultiplier"); + + b.Property("Betroll100Multiplier"); + + b.Property("Betroll67Multiplier"); + + b.Property("Betroll91Multiplier"); + + b.Property("BufferSize"); + + b.Property("CurrencyDropAmount"); + + b.Property("CurrencyGenerationChance"); + + b.Property("CurrencyGenerationCooldown"); + + b.Property("CurrencyName"); + + b.Property("CurrencyPluralName"); + + b.Property("CurrencySign"); + + b.Property("DMHelpString"); + + b.Property("DateAdded"); + + b.Property("ErrorColor"); + + b.Property("ForwardMessages"); + + b.Property("ForwardToAllOwners"); + + b.Property("HelpString"); + + b.Property("Locale"); + + b.Property("MigrationVersion"); + + b.Property("MinimumBetAmount"); + + b.Property("OkColor"); + + b.Property("RemindMessageFormat"); + + b.Property("RotatingStatuses"); + + b.Property("TriviaCurrencyReward"); + + 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("DateAdded"); + + 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("DateAdded"); + + 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("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Seconds"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("CommandCooldown"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("CommandName"); + + b.Property("DateAdded"); + + b.Property("Price"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.HasIndex("Price") + .IsUnique(); + + b.ToTable("CommandPrice"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + 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("DateAdded"); + + 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("DateAdded"); + + 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("DateAdded"); + + 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.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AvatarId"); + + b.Property("DateAdded"); + + b.Property("Discriminator"); + + b.Property("UserId"); + + b.Property("Username"); + + b.HasKey("Id"); + + b.HasAlternateKey("UserId"); + + b.ToTable("DiscordUser"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Amount"); + + b.Property("DateAdded"); + + 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("DateAdded"); + + 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("DateAdded"); + + 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("DateAdded"); + + 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("DateAdded"); + + 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("DateAdded"); + + 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("AutoDeleteByeMessagesTimer"); + + b.Property("AutoDeleteGreetMessages"); + + b.Property("AutoDeleteGreetMessagesTimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages"); + + b.Property("ByeMessageChannelId"); + + b.Property("ChannelByeMessageText"); + + b.Property("ChannelGreetMessageText"); + + b.Property("CleverbotEnabled"); + + b.Property("DateAdded"); + + 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("Locale"); + + b.Property("LogSettingId"); + + b.Property("MuteRoleName"); + + b.Property("PermissionRole"); + + b.Property("RootPermissionId"); + + b.Property("SendChannelByeMessage"); + + b.Property("SendChannelGreetMessage"); + + b.Property("SendDmGreetMessage"); + + b.Property("TimeZoneId"); + + 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.GuildRepeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("GuildId"); + + b.Property("Interval"); + + b.Property("Message"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("GuildRepeater"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + 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("DateAdded"); + + 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("ChannelCreatedId"); + + b.Property("ChannelDestroyed"); + + b.Property("ChannelDestroyedId"); + + b.Property("ChannelId"); + + b.Property("ChannelUpdated"); + + b.Property("ChannelUpdatedId"); + + b.Property("DateAdded"); + + b.Property("IsLogging"); + + b.Property("LogOtherId"); + + b.Property("LogUserPresence"); + + b.Property("LogUserPresenceId"); + + b.Property("LogVoicePresence"); + + b.Property("LogVoicePresenceId"); + + b.Property("LogVoicePresenceTTSId"); + + b.Property("MessageDeleted"); + + b.Property("MessageDeletedId"); + + b.Property("MessageUpdated"); + + b.Property("MessageUpdatedId"); + + b.Property("UserBanned"); + + b.Property("UserBannedId"); + + b.Property("UserJoined"); + + b.Property("UserJoinedId"); + + b.Property("UserLeft"); + + b.Property("UserLeftId"); + + b.Property("UserMutedId"); + + b.Property("UserPresenceChannelId"); + + b.Property("UserUnbanned"); + + b.Property("UserUnbannedId"); + + b.Property("UserUpdated"); + + b.Property("UserUpdatedId"); + + 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("DateAdded"); + + 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("DateAdded"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.ToTable("MusicPlaylists"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("MutedUserId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + 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("DateAdded"); + + 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("DateAdded"); + + 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("DateAdded"); + + 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("DateAdded"); + + 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("DateAdded"); + + 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.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildId"); + + b.Property("RoleId"); + + b.HasKey("Id"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique(); + + b.ToTable("SelfAssignableRoles"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("UserId"); + + b.Property("type"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("PokeGame"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AffinityId"); + + b.Property("ClaimerId"); + + b.Property("DateAdded"); + + b.Property("Price"); + + b.Property("WaifuId"); + + b.HasKey("Id"); + + b.HasIndex("AffinityId"); + + b.HasIndex("ClaimerId"); + + b.HasIndex("WaifuId") + .IsUnique(); + + b.ToTable("WaifuInfo"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("NewId"); + + b.Property("OldId"); + + b.Property("UpdateType"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("NewId"); + + b.HasIndex("OldId"); + + b.HasIndex("UserId"); + + b.ToTable("WaifuUpdates"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + 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.CommandPrice", b => + { + b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + .WithMany("CommandPrices") + .HasForeignKey("BotConfigId"); + }); + + 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.GuildRepeater", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("GuildRepeaters") + .HasForeignKey("GuildConfigId"); + }); + + 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.MutedUserId", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId"); + }); + + 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"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId"); + + b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId"); + + b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId"); + + b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId"); + + b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + } + } +} diff --git a/src/NadekoBot/Migrations/20170222162505_dateadded.cs b/src/NadekoBot/Migrations/20170222162505_dateadded.cs new file mode 100644 index 00000000..5f96eca8 --- /dev/null +++ b/src/NadekoBot/Migrations/20170222162505_dateadded.cs @@ -0,0 +1,357 @@ +using System; +using System.Collections.Generic; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace NadekoBot.Migrations +{ + public partial class dateadded : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "DateAdded", + table: "WaifuUpdates", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "WaifuInfo", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "PokeGame", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "SelfAssignableRoles", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "Reminders", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "RaceAnimals", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "Quotes", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "PlaylistSong", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "PlayingStatus", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "Permission", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "MutedUserId", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "MusicPlaylists", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "ModulePrefixes", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "LogSettings", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "IgnoredVoicePresenceCHannels", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "IgnoredLogChannels", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "GuildRepeater", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "GuildConfigs", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "GCChannelId", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "FollowedStream", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "FilteredWord", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "FilterChannelId", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "EightBallResponses", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "Donators", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "DiscordUser", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "CustomReactions", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "CurrencyTransactions", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "Currency", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "ConversionUnits", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "CommandPrice", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "CommandCooldown", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "ClashOfClans", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "ClashCallers", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "BotConfig", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "BlacklistItem", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "AntiSpamSetting", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "AntiSpamIgnore", + nullable: true); + + migrationBuilder.AddColumn( + name: "DateAdded", + table: "AntiRaidSetting", + nullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "DateAdded", + table: "WaifuUpdates"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "WaifuInfo"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "PokeGame"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "SelfAssignableRoles"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "Reminders"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "RaceAnimals"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "Quotes"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "PlaylistSong"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "PlayingStatus"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "Permission"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "MutedUserId"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "MusicPlaylists"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "ModulePrefixes"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "LogSettings"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "IgnoredVoicePresenceCHannels"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "IgnoredLogChannels"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "GuildRepeater"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "GuildConfigs"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "GCChannelId"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "FollowedStream"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "FilteredWord"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "FilterChannelId"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "EightBallResponses"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "Donators"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "DiscordUser"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "CustomReactions"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "CurrencyTransactions"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "Currency"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "ConversionUnits"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "CommandPrice"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "CommandCooldown"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "ClashOfClans"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "ClashCallers"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "BotConfig"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "BlacklistItem"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "AntiSpamSetting"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "AntiSpamIgnore"); + + migrationBuilder.DropColumn( + name: "DateAdded", + table: "AntiRaidSetting"); + } + } +} diff --git a/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs b/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs index 5a03594c..981d53cf 100644 --- a/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs +++ b/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs @@ -24,6 +24,8 @@ namespace NadekoBot.Migrations b.Property("Action"); + b.Property("DateAdded"); + b.Property("GuildConfigId"); b.Property("Seconds"); @@ -47,6 +49,8 @@ namespace NadekoBot.Migrations b.Property("ChannelId"); + b.Property("DateAdded"); + b.HasKey("Id"); b.HasIndex("AntiSpamSettingId"); @@ -61,6 +65,8 @@ namespace NadekoBot.Migrations b.Property("Action"); + b.Property("DateAdded"); + b.Property("GuildConfigId"); b.Property("MessageThreshold"); @@ -80,6 +86,8 @@ namespace NadekoBot.Migrations b.Property("BotConfigId"); + b.Property("DateAdded"); + b.Property("ItemId"); b.Property("Type"); @@ -120,6 +128,8 @@ namespace NadekoBot.Migrations b.Property("DMHelpString"); + b.Property("DateAdded"); + b.Property("ErrorColor"); b.Property("ForwardMessages"); @@ -158,6 +168,8 @@ namespace NadekoBot.Migrations b.Property("ClashWarId"); + b.Property("DateAdded"); + b.Property("SequenceNumber"); b.Property("Stars"); @@ -178,6 +190,8 @@ namespace NadekoBot.Migrations b.Property("ChannelId"); + b.Property("DateAdded"); + b.Property("EnemyClan"); b.Property("GuildId"); @@ -200,6 +214,8 @@ namespace NadekoBot.Migrations b.Property("CommandName"); + b.Property("DateAdded"); + b.Property("GuildConfigId"); b.Property("Seconds"); @@ -220,6 +236,8 @@ namespace NadekoBot.Migrations b.Property("CommandName"); + b.Property("DateAdded"); + b.Property("Price"); b.HasKey("Id"); @@ -237,6 +255,8 @@ namespace NadekoBot.Migrations b.Property("Id") .ValueGeneratedOnAdd(); + b.Property("DateAdded"); + b.Property("InternalTrigger"); b.Property("Modifier"); @@ -255,6 +275,8 @@ namespace NadekoBot.Migrations b.Property("Amount"); + b.Property("DateAdded"); + b.Property("UserId"); b.HasKey("Id"); @@ -272,6 +294,8 @@ namespace NadekoBot.Migrations b.Property("Amount"); + b.Property("DateAdded"); + b.Property("Reason"); b.Property("UserId"); @@ -286,6 +310,8 @@ namespace NadekoBot.Migrations b.Property("Id") .ValueGeneratedOnAdd(); + b.Property("DateAdded"); + b.Property("GuildId"); b.Property("IsRegex"); @@ -308,6 +334,8 @@ namespace NadekoBot.Migrations b.Property("AvatarId"); + b.Property("DateAdded"); + b.Property("Discriminator"); b.Property("UserId"); @@ -328,6 +356,8 @@ namespace NadekoBot.Migrations b.Property("Amount"); + b.Property("DateAdded"); + b.Property("Name"); b.Property("UserId"); @@ -347,6 +377,8 @@ namespace NadekoBot.Migrations b.Property("BotConfigId"); + b.Property("DateAdded"); + b.Property("Text"); b.HasKey("Id"); @@ -363,6 +395,8 @@ namespace NadekoBot.Migrations b.Property("ChannelId"); + b.Property("DateAdded"); + b.Property("GuildConfigId"); b.Property("GuildConfigId1"); @@ -381,6 +415,8 @@ namespace NadekoBot.Migrations b.Property("Id") .ValueGeneratedOnAdd(); + b.Property("DateAdded"); + b.Property("GuildConfigId"); b.Property("Word"); @@ -399,6 +435,8 @@ namespace NadekoBot.Migrations b.Property("ChannelId"); + b.Property("DateAdded"); + b.Property("GuildConfigId"); b.Property("GuildId"); @@ -421,6 +459,8 @@ namespace NadekoBot.Migrations b.Property("ChannelId"); + b.Property("DateAdded"); + b.Property("GuildConfigId"); b.HasKey("Id"); @@ -455,6 +495,8 @@ namespace NadekoBot.Migrations b.Property("CleverbotEnabled"); + b.Property("DateAdded"); + b.Property("DefaultMusicVolume"); b.Property("DeleteMessageOnCommand"); @@ -512,6 +554,8 @@ namespace NadekoBot.Migrations b.Property("ChannelId"); + b.Property("DateAdded"); + b.Property("GuildConfigId"); b.Property("GuildId"); @@ -534,6 +578,8 @@ namespace NadekoBot.Migrations b.Property("ChannelId"); + b.Property("DateAdded"); + b.Property("LogSettingId"); b.HasKey("Id"); @@ -550,6 +596,8 @@ namespace NadekoBot.Migrations b.Property("ChannelId"); + b.Property("DateAdded"); + b.Property("LogSettingId"); b.HasKey("Id"); @@ -578,6 +626,8 @@ namespace NadekoBot.Migrations b.Property("ChannelUpdatedId"); + b.Property("DateAdded"); + b.Property("IsLogging"); b.Property("LogOtherId"); @@ -638,6 +688,8 @@ namespace NadekoBot.Migrations b.Property("BotConfigId"); + b.Property("DateAdded"); + b.Property("ModuleName"); b.Property("Prefix"); @@ -658,6 +710,8 @@ namespace NadekoBot.Migrations b.Property("AuthorId"); + b.Property("DateAdded"); + b.Property("Name"); b.HasKey("Id"); @@ -670,6 +724,8 @@ namespace NadekoBot.Migrations b.Property("Id") .ValueGeneratedOnAdd(); + b.Property("DateAdded"); + b.Property("GuildConfigId"); b.Property("UserId"); @@ -686,6 +742,8 @@ namespace NadekoBot.Migrations b.Property("Id") .ValueGeneratedOnAdd(); + b.Property("DateAdded"); + b.Property("NextId"); b.Property("PrimaryTarget"); @@ -713,6 +771,8 @@ namespace NadekoBot.Migrations b.Property("BotConfigId"); + b.Property("DateAdded"); + b.Property("Status"); b.HasKey("Id"); @@ -727,6 +787,8 @@ namespace NadekoBot.Migrations b.Property("Id") .ValueGeneratedOnAdd(); + b.Property("DateAdded"); + b.Property("MusicPlaylistId"); b.Property("Provider"); @@ -756,6 +818,8 @@ namespace NadekoBot.Migrations b.Property("AuthorName") .IsRequired(); + b.Property("DateAdded"); + b.Property("GuildId"); b.Property("Keyword") @@ -776,6 +840,8 @@ namespace NadekoBot.Migrations b.Property("BotConfigId"); + b.Property("DateAdded"); + b.Property("Icon"); b.Property("Name"); @@ -794,6 +860,8 @@ namespace NadekoBot.Migrations b.Property("ChannelId"); + b.Property("DateAdded"); + b.Property("IsPrivate"); b.Property("Message"); @@ -814,6 +882,8 @@ namespace NadekoBot.Migrations b.Property("Id") .ValueGeneratedOnAdd(); + b.Property("DateAdded"); + b.Property("GuildId"); b.Property("RoleId"); @@ -831,6 +901,8 @@ namespace NadekoBot.Migrations b.Property("Id") .ValueGeneratedOnAdd(); + b.Property("DateAdded"); + b.Property("UserId"); b.Property("type"); @@ -852,6 +924,8 @@ namespace NadekoBot.Migrations b.Property("ClaimerId"); + b.Property("DateAdded"); + b.Property("Price"); b.Property("WaifuId"); @@ -873,6 +947,8 @@ namespace NadekoBot.Migrations b.Property("Id") .ValueGeneratedOnAdd(); + b.Property("DateAdded"); + b.Property("NewId"); b.Property("OldId"); diff --git a/src/NadekoBot/Modules/Games/Commands/Acropobia.cs b/src/NadekoBot/Modules/Games/Commands/Acropobia.cs index bcfc279d..ddaf3e98 100644 --- a/src/NadekoBot/Modules/Games/Commands/Acropobia.cs +++ b/src/NadekoBot/Modules/Games/Commands/Acropobia.cs @@ -240,7 +240,6 @@ $@"-- catch { } } - IGuildUser usr; //if (submissions.TryGetValue(input, out usr) && usr.Id != guildUser.Id) //{ // if (!usersWhoVoted.Add(guildUser.Id)) @@ -255,7 +254,7 @@ $@"-- if (int.TryParse(input, out num) && num > 0 && num <= _submissions.Count) { var kvp = _submissions.Skip(num - 1).First(); - usr = kvp.Value; + var usr = kvp.Value; //can't vote for yourself, can't vote multiple times if (usr.Id == guildUser.Id || !_usersWhoVoted.Add(guildUser.Id)) return; @@ -299,7 +298,7 @@ $@"-- } private string GetText(string key, params object[] replacements) - => NadekoTopLevelModule.GetTextStatic(key, + => GetTextStatic(key, NadekoBot.Localization.GetCultureInfo(_channel.Guild), typeof(Games).Name.ToLowerInvariant(), replacements); diff --git a/src/NadekoBot/Modules/Games/Commands/CleverBotCommands.cs b/src/NadekoBot/Modules/Games/Commands/CleverBotCommands.cs index 1f33bc2a..47aad031 100644 --- a/src/NadekoBot/Modules/Games/Commands/CleverBotCommands.cs +++ b/src/NadekoBot/Modules/Games/Commands/CleverBotCommands.cs @@ -19,7 +19,7 @@ namespace NadekoBot.Modules.Games [Group] public class CleverBotCommands : NadekoSubmodule { - private static Logger _log { get; } + private static new Logger _log { get; } public static ConcurrentDictionary> CleverbotGuilds { get; } = new ConcurrentDictionary>(); diff --git a/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs b/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs index ba98f5f1..423964cb 100644 --- a/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs +++ b/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs @@ -203,11 +203,11 @@ namespace NadekoBot.Modules.Games } if (enabled) { - await channel.SendConfirmAsync("Currency generation enabled on this channel.").ConfigureAwait(false); + await ReplyConfirmLocalized("curgen_enabled").ConfigureAwait(false); } else { - await channel.SendConfirmAsync("Currency generation disabled on this channel.").ConfigureAwait(false); + await ReplyConfirmLocalized("curgen_disabled").ConfigureAwait(false); } } diff --git a/src/NadekoBot/Modules/Games/Commands/TicTacToe.cs b/src/NadekoBot/Modules/Games/Commands/TicTacToe.cs index 2e115fd2..e1000af2 100644 --- a/src/NadekoBot/Modules/Games/Commands/TicTacToe.cs +++ b/src/NadekoBot/Modules/Games/Commands/TicTacToe.cs @@ -4,9 +4,7 @@ using NadekoBot.Attributes; using NadekoBot.Extensions; using NLog; using System; -using System.Collections.Concurrent; using System.Collections.Generic; -using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; @@ -21,15 +19,8 @@ namespace NadekoBot.Modules.Games { //channelId/game private static readonly Dictionary _games = new Dictionary(); - private readonly Logger _log; - - public TicTacToeCommands() - { - _log = LogManager.GetCurrentClassLogger(); - } private readonly SemaphoreSlim sem = new SemaphoreSlim(1, 1); - private readonly object tttLockObj = new object(); [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] diff --git a/src/NadekoBot/Modules/Games/Games.cs b/src/NadekoBot/Modules/Games/Games.cs index 88a663df..2249c1b2 100644 --- a/src/NadekoBot/Modules/Games/Games.cs +++ b/src/NadekoBot/Modules/Games/Games.cs @@ -141,8 +141,11 @@ namespace NadekoBot.Modules.Games var pointy = (int)(miny - length * ((Crazy - 4) / 6)); var p = new Pen(ImageSharp.Color.Red, 5); - - img.Draw(p, new SixLabors.Shapes.Ellipse(200, 200, 5, 5)); + //using (var pointMs = File.ReadAllBytes("data/images/point.png").ToStream()) + //using (var pointIMg = new ImageSharp.Image(pointMs)) + //{ + // img.DrawImage(pointIMg, 100, new ImageSharp.Size(100, 100), new Point(pointx, pointy)); + //} string url; using (var http = new HttpClient()) @@ -167,19 +170,19 @@ namespace NadekoBot.Modules.Games } } - //[NadekoCommand, Usage, Description, Aliases] - //[RequireContext(ContextType.Guild)] - //public async Task RateGirl(IGuildUser usr) - //{ - // var gr = _girlRatings.GetOrAdd(usr.Id, GetGirl); - // var img = await gr.Url; - // await Context.Channel.EmbedAsync(new EmbedBuilder().WithOkColor() - // .WithTitle("Girl Rating For " + usr) - // .AddField(efb => efb.WithName("Hot").WithValue(gr.Hot.ToString("F2")).WithIsInline(true)) - // .AddField(efb => efb.WithName("Crazy").WithValue(gr.Crazy.ToString("F2")).WithIsInline(true)) - // .AddField(efb => efb.WithName("Advice").WithValue(gr.Advice).WithIsInline(false)) - // .WithImageUrl(img)).ConfigureAwait(false); - //} + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task RateGirl(IGuildUser usr) + { + var gr = _girlRatings.GetOrAdd(usr.Id, GetGirl); + var img = await gr.Url; + await Context.Channel.EmbedAsync(new EmbedBuilder().WithOkColor() + .WithTitle("Girl Rating For " + usr) + .AddField(efb => efb.WithName("Hot").WithValue(gr.Hot.ToString("F2")).WithIsInline(true)) + .AddField(efb => efb.WithName("Crazy").WithValue(gr.Crazy.ToString("F2")).WithIsInline(true)) + .AddField(efb => efb.WithName("Advice").WithValue(gr.Advice).WithIsInline(false)) + .WithImageUrl(img)).ConfigureAwait(false); + } private double NextDouble(double x, double y) { diff --git a/src/NadekoBot/Modules/Utility/Utility.cs b/src/NadekoBot/Modules/Utility/Utility.cs index 8d3a95c4..f69aef7d 100644 --- a/src/NadekoBot/Modules/Utility/Utility.cs +++ b/src/NadekoBot/Modules/Utility/Utility.cs @@ -117,7 +117,7 @@ namespace NadekoBot.Modules.Utility if (rotatingRoleColors.TryRemove(role.Id, out t)) { t.Change(Timeout.Infinite, Timeout.Infinite); - await channel.SendConfirmAsync($"Stopped rotating colors for the **{role.Name}** role").ConfigureAwait(false); + await ReplyConfirmLocalized("rrc_stop", Format.Bold(role.Name)).ConfigureAwait(false); } return; } @@ -132,7 +132,7 @@ namespace NadekoBot.Modules.Utility if (!hexColors.Any()) { - await channel.SendMessageAsync("No colors are in the correct format. Use `#00ff00` for example.").ConfigureAwait(false); + await ReplyErrorLocalized("rrc_no_colors").ConfigureAwait(false); return; } @@ -162,8 +162,7 @@ namespace NadekoBot.Modules.Utility old.Change(Timeout.Infinite, Timeout.Infinite); return t; }); - - await channel.SendFileAsync(images, "magicalgirl.jpg", $"Rotating **{role.Name}** role's color.").ConfigureAwait(false); + await channel.SendFileAsync(images, "magicalgirl.jpg", GetText("rrc_start", Format.Bold(role.Name))).ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -180,14 +179,14 @@ namespace NadekoBot.Modules.Utility .WithAuthor(eab => eab.WithIconUrl("https://togethertube.com/assets/img/favicons/favicon-32x32.png") .WithName("Together Tube") .WithUrl("https://togethertube.com/")) - .WithDescription($"{Context.User.Mention} Here is your room link:\n{target}")); + .WithDescription(Context.User.Mention + " " + GetText("togtub_room_link") + "\n" + target)); } [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] - public async Task WhosPlaying([Remainder] string game = null) + public async Task WhosPlaying([Remainder] string game) { - game = game.Trim().ToUpperInvariant(); + game = game?.Trim().ToUpperInvariant(); if (string.IsNullOrWhiteSpace(game)) return; @@ -207,7 +206,7 @@ namespace NadekoBot.Modules.Utility int i = 0; if (arr.Length == 0) - await Context.Channel.SendErrorAsync("Nobody is playing that game.").ConfigureAwait(false); + await ReplyErrorLocalized("nobody_playing_game").ConfigureAwait(false); else { await Context.Channel.SendConfirmAsync("```css\n" + string.Join("\n", arr.GroupBy(item => (i++) / 2) @@ -218,26 +217,24 @@ namespace NadekoBot.Modules.Utility [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] - public async Task InRole([Remainder] string roles) + public async Task InRole(params IRole[] roles) { - if (string.IsNullOrWhiteSpace(roles)) + if (roles.Length == 0) return; - var arg = roles.Split(',').Select(r => r.Trim().ToUpperInvariant()); - string send = "ℹ️ **Here is a list of users in those roles:**"; - foreach (var roleStr in arg.Where(str => !string.IsNullOrWhiteSpace(str) && str != "@EVERYONE" && str != "EVERYONE")) + var send = "ℹ️ " + Format.Bold(GetText("inrole_list")); + var usrs = (await Context.Guild.GetUsersAsync()).ToArray(); + foreach (var role in roles.Where(r => r.Id != Context.Guild.Id)) { - var role = Context.Guild.Roles.Where(r => r.Name.ToUpperInvariant() == roleStr).FirstOrDefault(); - if (role == null) continue; send += $"```css\n[{role.Name}]\n"; - send += string.Join(", ", (await Context.Guild.GetUsersAsync()).Where(u => u.RoleIds.Contains(role.Id)).Select(u => u.ToString())); - send += $"\n```"; + send += string.Join(", ", usrs.Where(u => u.RoleIds.Contains(role.Id)).Select(u => u.ToString())); + send += "\n```"; } - var usr = Context.User as IGuildUser; + var usr = (IGuildUser)Context.User; while (send.Length > 2000) { if (!usr.GetPermissions((ITextChannel)Context.Channel).ManageMessages) { - await Context.Channel.SendErrorAsync($"⚠️ {usr.Mention} **you are not allowed to use this command on roles with a lot of users in them to prevent abuse.**").ConfigureAwait(false); + await ReplyErrorLocalized("inrole_not_allowed").ConfigureAwait(false); return; } var curstr = send.Substring(0, 2000); @@ -254,15 +251,13 @@ namespace NadekoBot.Modules.Utility public async Task CheckMyPerms() { - StringBuilder builder = new StringBuilder("```http\n"); - var user = Context.User as IGuildUser; + StringBuilder builder = new StringBuilder(); + var user = (IGuildUser) Context.User; var perms = user.GetPermissions((ITextChannel)Context.Channel); foreach (var p in perms.GetType().GetProperties().Where(p => !p.GetGetMethod().GetParameters().Any())) { - builder.AppendLine($"{p.Name} : {p.GetValue(perms, null).ToString()}"); + builder.AppendLine($"{p.Name} : {p.GetValue(perms, null)}"); } - - builder.Append("```"); await Context.Channel.SendConfirmAsync(builder.ToString()); } @@ -271,20 +266,23 @@ namespace NadekoBot.Modules.Utility public async Task UserId(IGuildUser target = null) { var usr = target ?? Context.User; - await Context.Channel.SendConfirmAsync($"🆔 of the user **{ usr.Username }** is `{ usr.Id }`").ConfigureAwait(false); + await ReplyConfirmLocalized("userid", "🆔", Format.Bold(usr.ToString()), + Format.Code(usr.Id.ToString())).ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] public async Task ChannelId() { - await Context.Channel.SendConfirmAsync($"🆔 of this channel is `{Context.Channel.Id}`").ConfigureAwait(false); + await ReplyConfirmLocalized("channelidd", "🆔", Format.Code(Context.Channel.Id.ToString())) + .ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] public async Task ServerId() { - await Context.Channel.SendConfirmAsync($"🆔 of this server is `{Context.Guild.Id}`").ConfigureAwait(false); + await ReplyConfirmLocalized("serverid", "🆔", Format.Code(Context.Guild.Id.ToString())) + .ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -294,33 +292,36 @@ namespace NadekoBot.Modules.Utility var channel = (ITextChannel)Context.Channel; var guild = channel.Guild; - const int RolesPerPage = 20; + const int rolesPerPage = 20; if (page < 1 || page > 100) return; if (target != null) { - var roles = target.GetRoles().Except(new[] { guild.EveryoneRole }).OrderBy(r => -r.Position).Skip((page - 1) * RolesPerPage).Take(RolesPerPage); + var roles = target.GetRoles().Except(new[] { guild.EveryoneRole }).OrderBy(r => -r.Position).Skip((page - 1) * rolesPerPage).Take(rolesPerPage).ToArray(); if (!roles.Any()) { - await channel.SendErrorAsync("No roles on this page.").ConfigureAwait(false); + await ReplyErrorLocalized("no_roles_on_page").ConfigureAwait(false); } else { - await channel.SendConfirmAsync($"⚔ **Page #{page} of roles for {target.Username}**", $"```css\n• " + string.Join("\n• ", roles).SanitizeMentions() + "\n```").ConfigureAwait(false); + + await channel.SendConfirmAsync(GetText("roles_page", page, Format.Bold(target.ToString())), + "\n• " + string.Join("\n• ", (IEnumerable)roles).SanitizeMentions()).ConfigureAwait(false); } } else { - var roles = guild.Roles.Except(new[] { guild.EveryoneRole }).OrderBy(r => -r.Position).Skip((page - 1) * RolesPerPage).Take(RolesPerPage); + var roles = guild.Roles.Except(new[] { guild.EveryoneRole }).OrderBy(r => -r.Position).Skip((page - 1) * rolesPerPage).Take(rolesPerPage).ToArray(); if (!roles.Any()) { - await channel.SendErrorAsync("No roles on this page.").ConfigureAwait(false); + await ReplyErrorLocalized("no_roles_on_page").ConfigureAwait(false); } else { - await channel.SendConfirmAsync($"⚔ **Page #{page} of all roles on this server:**", $"```css\n• " + string.Join("\n• ", roles).SanitizeMentions() + "\n```").ConfigureAwait(false); + await channel.SendConfirmAsync(GetText("roles_all_page", page), + "\n• " + string.Join("\n• ", (IEnumerable)roles).SanitizeMentions()).ConfigureAwait(false); } } } @@ -339,9 +340,9 @@ namespace NadekoBot.Modules.Utility var topic = channel.Topic; if (string.IsNullOrWhiteSpace(topic)) - await Context.Channel.SendErrorAsync("No topic set.").ConfigureAwait(false); + await ReplyErrorLocalized("no_topic_set").ConfigureAwait(false); else - await Context.Channel.SendConfirmAsync("Channel topic", topic).ConfigureAwait(false); + await Context.Channel.SendConfirmAsync(GetText("channel_topic"), topic).ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -362,11 +363,13 @@ namespace NadekoBot.Modules.Utility return; var status = string.Join(", ", NadekoBot.Client.Shards.GroupBy(x => x.ConnectionState) - .Select(x => $"{x.Count()} shards {x.Key}") + .Select(x => $"{x.Count()} {x.Key}") .ToArray()); var allShardStrings = NadekoBot.Client.Shards - .Select(x => $"Shard **#{x.ShardId.ToString()}** is in {Format.Bold(x.ConnectionState.ToString())} state with {Format.Bold(x.Guilds.Count.ToString())} servers") + .Select(x => + GetText("shard_stats_txt", x.ShardId.ToString(), + Format.Bold(x.ConnectionState.ToString()), Format.Bold(x.Guilds.Count.ToString()))) .ToArray(); @@ -377,10 +380,10 @@ namespace NadekoBot.Modules.Utility var str = string.Join("\n", allShardStrings.Skip(25 * (curPage - 1)).Take(25)); if (string.IsNullOrWhiteSpace(str)) - str = "No shards on this page."; + str = GetText("no_shards_on_page"); return new EmbedBuilder() - .WithAuthor(a => a.WithName("Shard Stats")) + .WithAuthor(a => a.WithName(GetText("shard_stats"))) .WithTitle(status) .WithOkColor() .WithDescription(str); @@ -392,7 +395,7 @@ namespace NadekoBot.Modules.Utility { var shardId = NadekoBot.Client.GetShardIdFor(guildid); - await Context.Channel.SendConfirmAsync($"ShardId for **{guildid}** with {NadekoBot.Client.Shards.Count} total shards", shardId.ToString()).ConfigureAwait(false); + await Context.Channel.SendConfirmAsync(shardId.ToString()).ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -409,17 +412,21 @@ namespace NadekoBot.Modules.Utility .WithAuthor(eab => eab.WithName($"NadekoBot v{StatsService.BotVersion}") .WithUrl("http://nadekobot.readthedocs.io/en/latest/") .WithIconUrl("https://cdn.discordapp.com/avatars/116275390695079945/b21045e778ef21c96d175400e779f0fb.jpg")) - .AddField(efb => efb.WithName(Format.Bold("Author")).WithValue(stats.Author).WithIsInline(true)) - .AddField(efb => efb.WithName(Format.Bold("Bot ID")).WithValue(NadekoBot.Client.CurrentUser.Id.ToString()).WithIsInline(true)) - .AddField(efb => efb.WithName(Format.Bold("Shard")).WithValue($"#{shardId}, {NadekoBot.Client.Shards.Count} total").WithIsInline(true)) - .AddField(efb => efb.WithName(Format.Bold("Commands Ran")).WithValue(stats.CommandsRan.ToString()).WithIsInline(true)) - .AddField(efb => efb.WithName(Format.Bold("Messages")).WithValue($"{stats.MessageCounter} ({stats.MessagesPerSecond:F2}/sec)").WithIsInline(true)) - .AddField(efb => efb.WithName(Format.Bold("Memory")).WithValue($"{stats.Heap} MB").WithIsInline(true)) - .AddField(efb => efb.WithName(Format.Bold("Owner ID(s)")).WithValue(string.Join("\n", NadekoBot.Credentials.OwnerIds)).WithIsInline(true)) - .AddField(efb => efb.WithName(Format.Bold("Uptime")).WithValue(stats.GetUptimeString("\n")).WithIsInline(true)) - .AddField(efb => efb.WithName(Format.Bold("Presence")).WithValue($"{NadekoBot.Client.GetGuildCount()} Servers\n{stats.TextChannels} Text Channels\n{stats.VoiceChannels} Voice Channels").WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("author")).WithValue(stats.Author).WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("botid")).WithValue(NadekoBot.Client.CurrentUser.Id.ToString()).WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("shard")).WithValue($"#{shardId} / {NadekoBot.Client.Shards.Count}").WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("commands_ran")).WithValue(stats.CommandsRan.ToString()).WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("messages")).WithValue($"{stats.MessageCounter} ({stats.MessagesPerSecond:F2}/sec)").WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("memory")).WithValue($"{stats.Heap} MB").WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("owner_ids")).WithValue(string.Join("\n", NadekoBot.Credentials.OwnerIds)).WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("uptime")).WithValue(stats.GetUptimeString("\n")).WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("presence")).WithValue( + GetText("presence_txt", + NadekoBot.Client.GetGuildCount(), stats.TextChannels, stats.VoiceChannels)).WithIsInline(true)) #if !GLOBAL_NADEKO - .WithFooter(efb => efb.WithText($"Playing {Music.Music.MusicPlayers.Where(mp => mp.Value.CurrentSong != null).Count()} songs, {Music.Music.MusicPlayers.Sum(mp => mp.Value.Playlist.Count)} queued.")) + .WithFooter(efb => efb.WithText(GetText("stats_songs", + Music.Music.MusicPlayers.Count(mp => mp.Value.CurrentSong != null), + Music.Music.MusicPlayers.Sum(mp => mp.Value.Playlist.Count)))) #endif ); } @@ -429,10 +436,10 @@ namespace NadekoBot.Modules.Utility { var tags = Context.Message.Tags.Where(t => t.Type == TagType.Emoji).Select(t => (Emoji)t.Value); - var result = string.Join("\n", tags.Select(m => $"**Name:** {m} **Link:** {m.Url}")); + var result = string.Join("\n", tags.Select(m => GetText("showemojis", m, m.Url))); if (string.IsNullOrWhiteSpace(result)) - await Context.Channel.SendErrorAsync("No special emojis found."); + await ReplyErrorLocalized("emojis_none").ConfigureAwait(false); else await Context.Channel.SendMessageAsync(result).ConfigureAwait(false); } @@ -450,13 +457,15 @@ namespace NadekoBot.Modules.Utility if (!guilds.Any()) { - await Context.Channel.SendErrorAsync("No servers found on that page.").ConfigureAwait(false); + await ReplyErrorLocalized("listservers_none").ConfigureAwait(false); return; } await Context.Channel.EmbedAsync(guilds.Aggregate(new EmbedBuilder().WithOkColor(), (embed, g) => embed.AddField(efb => efb.WithName(g.Name) - .WithValue($"```css\nID: {g.Id}\nMembers: {g.Users.Count}\nOwnerID: {g.OwnerId} ```") + .WithValue( + GetText("listservers", g.Id, g.Users.Count, + g.OwnerId)) .WithIsInline(false)))) .ConfigureAwait(false); } diff --git a/src/NadekoBot/Resources/CommandStrings.Designer.cs b/src/NadekoBot/Resources/CommandStrings.Designer.cs index e6390b66..52100d6c 100644 --- a/src/NadekoBot/Resources/CommandStrings.Designer.cs +++ b/src/NadekoBot/Resources/CommandStrings.Designer.cs @@ -3552,7 +3552,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to Lists every person from the provided role or roles (separated by a ',') on this server. If the list is too long for 1 message, you must have Manage Messages permission.. + /// Looks up a localized string similar to Lists every person from the provided role or roles, separated with space, on this server. You can use role IDs, role names (in quotes if it has multiple words), or role mention If the list is too long for 1 message, you must have Manage Messages permission.. /// public static string inrole_desc { get { @@ -3561,7 +3561,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to `{0}inrole Role`. + /// Looks up a localized string similar to `{0}inrole Role` or `{0}inrole Role1 "Role 2" @role3`. /// public static string inrole_usage { get { diff --git a/src/NadekoBot/Resources/CommandStrings.resx b/src/NadekoBot/Resources/CommandStrings.resx index c661db7d..703fcf20 100644 --- a/src/NadekoBot/Resources/CommandStrings.resx +++ b/src/NadekoBot/Resources/CommandStrings.resx @@ -841,10 +841,10 @@ inrole - Lists every person from the provided role or roles (separated by a ',') on this server. If the list is too long for 1 message, you must have Manage Messages permission. + Lists every person from the provided role or roles, separated with space, on this server. You can use role IDs, role names (in quotes if it has multiple words), or role mention If the list is too long for 1 message, you must have Manage Messages permission. - `{0}inrole Role` + `{0}inrole Role` or `{0}inrole Role1 "Role 2" @role3` checkmyperms diff --git a/src/NadekoBot/Resources/ResponseStrings.Designer.cs b/src/NadekoBot/Resources/ResponseStrings.Designer.cs index da3aab5b..d6423df6 100644 --- a/src/NadekoBot/Resources/ResponseStrings.Designer.cs +++ b/src/NadekoBot/Resources/ResponseStrings.Designer.cs @@ -3352,5 +3352,306 @@ namespace NadekoBot.Resources { return ResourceManager.GetString("pokemon_you_fainted", resourceCulture); } } + + /// + /// Looks up a localized string similar to Author. + /// + public static string utility_author { + get { + return ResourceManager.GetString("utility_author", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Bot ID. + /// + public static string utility_botid { + get { + return ResourceManager.GetString("utility_botid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Channel Topic. + /// + public static string utility_channel_topic { + get { + return ResourceManager.GetString("utility_channel_topic", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} of this channel is {1}. + /// + public static string utility_channelid { + get { + return ResourceManager.GetString("utility_channelid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Commands Ran. + /// + public static string utility_commands_ran { + get { + return ResourceManager.GetString("utility_commands_ran", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Here is a list of users in those roles:. + /// + public static string utility_inrole_list { + get { + return ResourceManager.GetString("utility_inrole_list", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to you are not allowed to use this command on roles with a lot of users in them to prevent abuse.. + /// + public static string utility_inrole_not_allowed { + get { + return ResourceManager.GetString("utility_inrole_not_allowed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID: {0} + ///Members: {1} + ///OwnerID: {2}. + /// + public static string utility_listservers { + get { + return ResourceManager.GetString("utility_listservers", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No servers found on that page.. + /// + public static string utility_listservers_none { + get { + return ResourceManager.GetString("utility_listservers_none", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Memory. + /// + public static string utility_memory { + get { + return ResourceManager.GetString("utility_memory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Messages. + /// + public static string utility_messages { + get { + return ResourceManager.GetString("utility_messages", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No roles on this page.. + /// + public static string utility_no_roles_on_page { + get { + return ResourceManager.GetString("utility_no_roles_on_page", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No shards on this page.. + /// + public static string utility_no_shards_on_page { + get { + return ResourceManager.GetString("utility_no_shards_on_page", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No topic set.. + /// + public static string utility_no_topic_set { + get { + return ResourceManager.GetString("utility_no_topic_set", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Nobody is playing that game.. + /// + public static string utility_nobody_playing_game { + get { + return ResourceManager.GetString("utility_nobody_playing_game", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Owner IDs. + /// + public static string utility_owner_ids { + get { + return ResourceManager.GetString("utility_owner_ids", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Presence. + /// + public static string utility_presence { + get { + return ResourceManager.GetString("utility_presence", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} Servers + ///{1} Text Channels + ///{2} Voice Channels. + /// + public static string utility_presence_txt { + get { + return ResourceManager.GetString("utility_presence_txt", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Page #{0} of all roles on this server:. + /// + public static string utility_roles_all_page { + get { + return ResourceManager.GetString("utility_roles_all_page", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Page #{0} of roels for {1}. + /// + public static string utility_roles_page { + get { + return ResourceManager.GetString("utility_roles_page", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No colors are in the correct format. Use `#00ff00` for example.. + /// + public static string utility_rrc_no_colors { + get { + return ResourceManager.GetString("utility_rrc_no_colors", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Started rotating {0} role's color.. + /// + public static string utility_rrc_start { + get { + return ResourceManager.GetString("utility_rrc_start", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stopped rotating colors for the {0} role. + /// + public static string utility_rrc_stop { + get { + return ResourceManager.GetString("utility_rrc_stop", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} of this server is {1}. + /// + public static string utility_serverid { + get { + return ResourceManager.GetString("utility_serverid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Shard. + /// + public static string utility_shard { + get { + return ResourceManager.GetString("utility_shard", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Shard Stats. + /// + public static string utility_shard_stats { + get { + return ResourceManager.GetString("utility_shard_stats", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Shard **#{0}** is in {1} state with {2} servers. + /// + public static string utility_shard_stats_txt { + get { + return ResourceManager.GetString("utility_shard_stats_txt", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to **Name:** {0} **Link:** {1}. + /// + public static string utility_showemojis { + get { + return ResourceManager.GetString("utility_showemojis", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No special emojis found.. + /// + public static string utility_showemojis_none { + get { + return ResourceManager.GetString("utility_showemojis_none", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Playing {0} songs, {1} queued.. + /// + public static string utility_stats_songs { + get { + return ResourceManager.GetString("utility_stats_songs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Here is your room link:. + /// + public static string utility_togtub_room_link { + get { + return ResourceManager.GetString("utility_togtub_room_link", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Uptime. + /// + public static string utility_uptime { + get { + return ResourceManager.GetString("utility_uptime", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} of the user {1} is {2}. + /// + public static string utility_userid { + get { + return ResourceManager.GetString("utility_userid", resourceCulture); + } + } } } diff --git a/src/NadekoBot/Resources/ResponseStrings.resx b/src/NadekoBot/Resources/ResponseStrings.resx index 6fa196c1..95396e70 100644 --- a/src/NadekoBot/Resources/ResponseStrings.resx +++ b/src/NadekoBot/Resources/ResponseStrings.resx @@ -1239,4 +1239,108 @@ Don't forget to leave your discord name or id in the message. List of "{0}hangman" term types: + + Author + + + Bot ID + + + {0} of this channel is {1} + + + Channel Topic + + + Commands Ran + + + Here is a list of users in those roles: + + + you are not allowed to use this command on roles with a lot of users in them to prevent abuse. + + + ID: {0} +Members: {1} +OwnerID: {2} + + + No servers found on that page. + + + Memory + + + Messages + + + Nobody is playing that game. + + + No roles on this page. + + + No shards on this page. + + + No topic set. + + + Owner IDs + + + Presence + + + {0} Servers +{1} Text Channels +{2} Voice Channels + + + Page #{0} of all roles on this server: + + + Page #{0} of roels for {1} + + + No colors are in the correct format. Use `#00ff00` for example. + + + Started rotating {0} role's color. + + + Stopped rotating colors for the {0} role + + + {0} of this server is {1} + + + Shard + + + Shard Stats + + + Shard **#{0}** is in {1} state with {2} servers + + + **Name:** {0} **Link:** {1} + + + No special emojis found. + + + Playing {0} songs, {1} queued. + + + Here is your room link: + + + Uptime + + + {0} of the user {1} is {2} + Id of the user kwoth#1234 is 123123123123 + \ No newline at end of file diff --git a/src/NadekoBot/Services/Database/Models/DbEntity.cs b/src/NadekoBot/Services/Database/Models/DbEntity.cs index 5c7dda6b..e727851c 100644 --- a/src/NadekoBot/Services/Database/Models/DbEntity.cs +++ b/src/NadekoBot/Services/Database/Models/DbEntity.cs @@ -7,6 +7,6 @@ namespace NadekoBot.Services.Database.Models { [Key] public int Id { get; set; } - public DateTime DateAdded { get; } = DateTime.UtcNow; + public DateTime? DateAdded { get; set; } = DateTime.UtcNow; } }