A lot more localization, cleanup, inole improved and dateadded is not a field in all database models
This commit is contained in:
parent
ec9c556f06
commit
5cdb41b65f
1171
src/NadekoBot/Migrations/20170222162505_dateadded.Designer.cs
generated
Normal file
1171
src/NadekoBot/Migrations/20170222162505_dateadded.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
357
src/NadekoBot/Migrations/20170222162505_dateadded.cs
Normal file
357
src/NadekoBot/Migrations/20170222162505_dateadded.cs
Normal file
@ -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<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "WaifuUpdates",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "WaifuInfo",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "PokeGame",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "SelfAssignableRoles",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "Reminders",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "RaceAnimals",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "Quotes",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "PlaylistSong",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "PlayingStatus",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "Permission",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "MutedUserId",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "MusicPlaylists",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "ModulePrefixes",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "LogSettings",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "IgnoredVoicePresenceCHannels",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "IgnoredLogChannels",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "GuildRepeater",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "GuildConfigs",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "GCChannelId",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "FollowedStream",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "FilteredWord",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "FilterChannelId",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "EightBallResponses",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "Donators",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "DiscordUser",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "CustomReactions",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "CurrencyTransactions",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "Currency",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "ConversionUnits",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "CommandPrice",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "CommandCooldown",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "ClashOfClans",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "ClashCallers",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "BotConfig",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "BlacklistItem",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "AntiSpamSetting",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateAdded",
|
||||
table: "AntiSpamIgnore",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
@ -24,6 +24,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<int>("Action");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<int>("GuildConfigId");
|
||||
|
||||
b.Property<int>("Seconds");
|
||||
@ -47,6 +49,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<ulong>("ChannelId");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("AntiSpamSettingId");
|
||||
@ -61,6 +65,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<int>("Action");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<int>("GuildConfigId");
|
||||
|
||||
b.Property<int>("MessageThreshold");
|
||||
@ -80,6 +86,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<int?>("BotConfigId");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<ulong>("ItemId");
|
||||
|
||||
b.Property<int>("Type");
|
||||
@ -120,6 +128,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<string>("DMHelpString");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<string>("ErrorColor");
|
||||
|
||||
b.Property<bool>("ForwardMessages");
|
||||
@ -158,6 +168,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<int>("ClashWarId");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<int?>("SequenceNumber");
|
||||
|
||||
b.Property<int>("Stars");
|
||||
@ -178,6 +190,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<ulong>("ChannelId");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<string>("EnemyClan");
|
||||
|
||||
b.Property<ulong>("GuildId");
|
||||
@ -200,6 +214,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<string>("CommandName");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<int?>("GuildConfigId");
|
||||
|
||||
b.Property<int>("Seconds");
|
||||
@ -220,6 +236,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<string>("CommandName");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<int>("Price");
|
||||
|
||||
b.HasKey("Id");
|
||||
@ -237,6 +255,8 @@ namespace NadekoBot.Migrations
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<string>("InternalTrigger");
|
||||
|
||||
b.Property<decimal>("Modifier");
|
||||
@ -255,6 +275,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<long>("Amount");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<ulong>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
@ -272,6 +294,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<long>("Amount");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<string>("Reason");
|
||||
|
||||
b.Property<ulong>("UserId");
|
||||
@ -286,6 +310,8 @@ namespace NadekoBot.Migrations
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<ulong?>("GuildId");
|
||||
|
||||
b.Property<bool>("IsRegex");
|
||||
@ -308,6 +334,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<string>("AvatarId");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<string>("Discriminator");
|
||||
|
||||
b.Property<ulong>("UserId");
|
||||
@ -328,6 +356,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<int>("Amount");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<ulong>("UserId");
|
||||
@ -347,6 +377,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<int?>("BotConfigId");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<string>("Text");
|
||||
|
||||
b.HasKey("Id");
|
||||
@ -363,6 +395,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<ulong>("ChannelId");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<int?>("GuildConfigId");
|
||||
|
||||
b.Property<int?>("GuildConfigId1");
|
||||
@ -381,6 +415,8 @@ namespace NadekoBot.Migrations
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<int?>("GuildConfigId");
|
||||
|
||||
b.Property<string>("Word");
|
||||
@ -399,6 +435,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<ulong>("ChannelId");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<int?>("GuildConfigId");
|
||||
|
||||
b.Property<ulong>("GuildId");
|
||||
@ -421,6 +459,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<ulong>("ChannelId");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<int?>("GuildConfigId");
|
||||
|
||||
b.HasKey("Id");
|
||||
@ -455,6 +495,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<bool>("CleverbotEnabled");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<float>("DefaultMusicVolume");
|
||||
|
||||
b.Property<bool>("DeleteMessageOnCommand");
|
||||
@ -512,6 +554,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<ulong>("ChannelId");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<int?>("GuildConfigId");
|
||||
|
||||
b.Property<ulong>("GuildId");
|
||||
@ -534,6 +578,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<ulong>("ChannelId");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<int?>("LogSettingId");
|
||||
|
||||
b.HasKey("Id");
|
||||
@ -550,6 +596,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<ulong>("ChannelId");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<int?>("LogSettingId");
|
||||
|
||||
b.HasKey("Id");
|
||||
@ -578,6 +626,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<ulong?>("ChannelUpdatedId");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<bool>("IsLogging");
|
||||
|
||||
b.Property<ulong?>("LogOtherId");
|
||||
@ -638,6 +688,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<int?>("BotConfigId");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<string>("ModuleName");
|
||||
|
||||
b.Property<string>("Prefix");
|
||||
@ -658,6 +710,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<ulong>("AuthorId");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
@ -670,6 +724,8 @@ namespace NadekoBot.Migrations
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<int?>("GuildConfigId");
|
||||
|
||||
b.Property<ulong>("UserId");
|
||||
@ -686,6 +742,8 @@ namespace NadekoBot.Migrations
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<int?>("NextId");
|
||||
|
||||
b.Property<int>("PrimaryTarget");
|
||||
@ -713,6 +771,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<int?>("BotConfigId");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<string>("Status");
|
||||
|
||||
b.HasKey("Id");
|
||||
@ -727,6 +787,8 @@ namespace NadekoBot.Migrations
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<int?>("MusicPlaylistId");
|
||||
|
||||
b.Property<string>("Provider");
|
||||
@ -756,6 +818,8 @@ namespace NadekoBot.Migrations
|
||||
b.Property<string>("AuthorName")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<ulong>("GuildId");
|
||||
|
||||
b.Property<string>("Keyword")
|
||||
@ -776,6 +840,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<int?>("BotConfigId");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<string>("Icon");
|
||||
|
||||
b.Property<string>("Name");
|
||||
@ -794,6 +860,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<ulong>("ChannelId");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<bool>("IsPrivate");
|
||||
|
||||
b.Property<string>("Message");
|
||||
@ -814,6 +882,8 @@ namespace NadekoBot.Migrations
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<ulong>("GuildId");
|
||||
|
||||
b.Property<ulong>("RoleId");
|
||||
@ -831,6 +901,8 @@ namespace NadekoBot.Migrations
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<ulong>("UserId");
|
||||
|
||||
b.Property<string>("type");
|
||||
@ -852,6 +924,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<int?>("ClaimerId");
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<int>("Price");
|
||||
|
||||
b.Property<int>("WaifuId");
|
||||
@ -873,6 +947,8 @@ namespace NadekoBot.Migrations
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime?>("DateAdded");
|
||||
|
||||
b.Property<int?>("NewId");
|
||||
|
||||
b.Property<int?>("OldId");
|
||||
|
@ -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);
|
||||
|
@ -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<ulong, Lazy<ChatterBotSession>> CleverbotGuilds { get; } = new ConcurrentDictionary<ulong, Lazy<ChatterBotSession>>();
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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<ulong, TicTacToe> _games = new Dictionary<ulong, TicTacToe>();
|
||||
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)]
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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<IRole>)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<IRole>)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);
|
||||
}
|
||||
|
@ -3552,7 +3552,7 @@ namespace NadekoBot.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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..
|
||||
/// </summary>
|
||||
public static string inrole_desc {
|
||||
get {
|
||||
@ -3561,7 +3561,7 @@ namespace NadekoBot.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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`.
|
||||
/// </summary>
|
||||
public static string inrole_usage {
|
||||
get {
|
||||
|
@ -841,10 +841,10 @@
|
||||
<value>inrole</value>
|
||||
</data>
|
||||
<data name="inrole_desc" xml:space="preserve">
|
||||
<value>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.</value>
|
||||
<value>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.</value>
|
||||
</data>
|
||||
<data name="inrole_usage" xml:space="preserve">
|
||||
<value>`{0}inrole Role`</value>
|
||||
<value>`{0}inrole Role` or `{0}inrole Role1 "Role 2" @role3`</value>
|
||||
</data>
|
||||
<data name="checkmyperms_cmd" xml:space="preserve">
|
||||
<value>checkmyperms</value>
|
||||
|
301
src/NadekoBot/Resources/ResponseStrings.Designer.cs
generated
301
src/NadekoBot/Resources/ResponseStrings.Designer.cs
generated
@ -3352,5 +3352,306 @@ namespace NadekoBot.Resources {
|
||||
return ResourceManager.GetString("pokemon_you_fainted", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Author.
|
||||
/// </summary>
|
||||
public static string utility_author {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_author", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Bot ID.
|
||||
/// </summary>
|
||||
public static string utility_botid {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_botid", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Channel Topic.
|
||||
/// </summary>
|
||||
public static string utility_channel_topic {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_channel_topic", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} of this channel is {1}.
|
||||
/// </summary>
|
||||
public static string utility_channelid {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_channelid", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Commands Ran.
|
||||
/// </summary>
|
||||
public static string utility_commands_ran {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_commands_ran", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Here is a list of users in those roles:.
|
||||
/// </summary>
|
||||
public static string utility_inrole_list {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_inrole_list", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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..
|
||||
/// </summary>
|
||||
public static string utility_inrole_not_allowed {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_inrole_not_allowed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ID: {0}
|
||||
///Members: {1}
|
||||
///OwnerID: {2}.
|
||||
/// </summary>
|
||||
public static string utility_listservers {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_listservers", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No servers found on that page..
|
||||
/// </summary>
|
||||
public static string utility_listservers_none {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_listservers_none", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Memory.
|
||||
/// </summary>
|
||||
public static string utility_memory {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_memory", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Messages.
|
||||
/// </summary>
|
||||
public static string utility_messages {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_messages", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No roles on this page..
|
||||
/// </summary>
|
||||
public static string utility_no_roles_on_page {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_no_roles_on_page", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No shards on this page..
|
||||
/// </summary>
|
||||
public static string utility_no_shards_on_page {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_no_shards_on_page", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No topic set..
|
||||
/// </summary>
|
||||
public static string utility_no_topic_set {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_no_topic_set", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Nobody is playing that game..
|
||||
/// </summary>
|
||||
public static string utility_nobody_playing_game {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_nobody_playing_game", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Owner IDs.
|
||||
/// </summary>
|
||||
public static string utility_owner_ids {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_owner_ids", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Presence.
|
||||
/// </summary>
|
||||
public static string utility_presence {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_presence", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} Servers
|
||||
///{1} Text Channels
|
||||
///{2} Voice Channels.
|
||||
/// </summary>
|
||||
public static string utility_presence_txt {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_presence_txt", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Page #{0} of all roles on this server:.
|
||||
/// </summary>
|
||||
public static string utility_roles_all_page {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_roles_all_page", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Page #{0} of roels for {1}.
|
||||
/// </summary>
|
||||
public static string utility_roles_page {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_roles_page", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No colors are in the correct format. Use `#00ff00` for example..
|
||||
/// </summary>
|
||||
public static string utility_rrc_no_colors {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_rrc_no_colors", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Started rotating {0} role's color..
|
||||
/// </summary>
|
||||
public static string utility_rrc_start {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_rrc_start", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stopped rotating colors for the {0} role.
|
||||
/// </summary>
|
||||
public static string utility_rrc_stop {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_rrc_stop", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} of this server is {1}.
|
||||
/// </summary>
|
||||
public static string utility_serverid {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_serverid", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Shard.
|
||||
/// </summary>
|
||||
public static string utility_shard {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_shard", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Shard Stats.
|
||||
/// </summary>
|
||||
public static string utility_shard_stats {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_shard_stats", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Shard **#{0}** is in {1} state with {2} servers.
|
||||
/// </summary>
|
||||
public static string utility_shard_stats_txt {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_shard_stats_txt", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to **Name:** {0} **Link:** {1}.
|
||||
/// </summary>
|
||||
public static string utility_showemojis {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_showemojis", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No special emojis found..
|
||||
/// </summary>
|
||||
public static string utility_showemojis_none {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_showemojis_none", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Playing {0} songs, {1} queued..
|
||||
/// </summary>
|
||||
public static string utility_stats_songs {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_stats_songs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Here is your room link:.
|
||||
/// </summary>
|
||||
public static string utility_togtub_room_link {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_togtub_room_link", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Uptime.
|
||||
/// </summary>
|
||||
public static string utility_uptime {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_uptime", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} of the user {1} is {2}.
|
||||
/// </summary>
|
||||
public static string utility_userid {
|
||||
get {
|
||||
return ResourceManager.GetString("utility_userid", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1239,4 +1239,108 @@ Don't forget to leave your discord name or id in the message.
|
||||
<data name="games_hangman_types" xml:space="preserve">
|
||||
<value>List of "{0}hangman" term types:</value>
|
||||
</data>
|
||||
<data name="utility_author" xml:space="preserve">
|
||||
<value>Author</value>
|
||||
</data>
|
||||
<data name="utility_botid" xml:space="preserve">
|
||||
<value>Bot ID</value>
|
||||
</data>
|
||||
<data name="utility_channelid" xml:space="preserve">
|
||||
<value>{0} of this channel is {1}</value>
|
||||
</data>
|
||||
<data name="utility_channel_topic" xml:space="preserve">
|
||||
<value>Channel Topic</value>
|
||||
</data>
|
||||
<data name="utility_commands_ran" xml:space="preserve">
|
||||
<value>Commands Ran</value>
|
||||
</data>
|
||||
<data name="utility_inrole_list" xml:space="preserve">
|
||||
<value>Here is a list of users in those roles:</value>
|
||||
</data>
|
||||
<data name="utility_inrole_not_allowed" xml:space="preserve">
|
||||
<value>you are not allowed to use this command on roles with a lot of users in them to prevent abuse.</value>
|
||||
</data>
|
||||
<data name="utility_listservers" xml:space="preserve">
|
||||
<value>ID: {0}
|
||||
Members: {1}
|
||||
OwnerID: {2}</value>
|
||||
</data>
|
||||
<data name="utility_listservers_none" xml:space="preserve">
|
||||
<value>No servers found on that page.</value>
|
||||
</data>
|
||||
<data name="utility_memory" xml:space="preserve">
|
||||
<value>Memory</value>
|
||||
</data>
|
||||
<data name="utility_messages" xml:space="preserve">
|
||||
<value>Messages</value>
|
||||
</data>
|
||||
<data name="utility_nobody_playing_game" xml:space="preserve">
|
||||
<value>Nobody is playing that game.</value>
|
||||
</data>
|
||||
<data name="utility_no_roles_on_page" xml:space="preserve">
|
||||
<value>No roles on this page.</value>
|
||||
</data>
|
||||
<data name="utility_no_shards_on_page" xml:space="preserve">
|
||||
<value>No shards on this page.</value>
|
||||
</data>
|
||||
<data name="utility_no_topic_set" xml:space="preserve">
|
||||
<value>No topic set.</value>
|
||||
</data>
|
||||
<data name="utility_owner_ids" xml:space="preserve">
|
||||
<value>Owner IDs</value>
|
||||
</data>
|
||||
<data name="utility_presence" xml:space="preserve">
|
||||
<value>Presence</value>
|
||||
</data>
|
||||
<data name="utility_presence_txt" xml:space="preserve">
|
||||
<value>{0} Servers
|
||||
{1} Text Channels
|
||||
{2} Voice Channels</value>
|
||||
</data>
|
||||
<data name="utility_roles_all_page" xml:space="preserve">
|
||||
<value>Page #{0} of all roles on this server:</value>
|
||||
</data>
|
||||
<data name="utility_roles_page" xml:space="preserve">
|
||||
<value>Page #{0} of roels for {1}</value>
|
||||
</data>
|
||||
<data name="utility_rrc_no_colors" xml:space="preserve">
|
||||
<value>No colors are in the correct format. Use `#00ff00` for example.</value>
|
||||
</data>
|
||||
<data name="utility_rrc_start" xml:space="preserve">
|
||||
<value>Started rotating {0} role's color.</value>
|
||||
</data>
|
||||
<data name="utility_rrc_stop" xml:space="preserve">
|
||||
<value>Stopped rotating colors for the {0} role</value>
|
||||
</data>
|
||||
<data name="utility_serverid" xml:space="preserve">
|
||||
<value>{0} of this server is {1}</value>
|
||||
</data>
|
||||
<data name="utility_shard" xml:space="preserve">
|
||||
<value>Shard</value>
|
||||
</data>
|
||||
<data name="utility_shard_stats" xml:space="preserve">
|
||||
<value>Shard Stats</value>
|
||||
</data>
|
||||
<data name="utility_shard_stats_txt" xml:space="preserve">
|
||||
<value>Shard **#{0}** is in {1} state with {2} servers</value>
|
||||
</data>
|
||||
<data name="utility_showemojis" xml:space="preserve">
|
||||
<value>**Name:** {0} **Link:** {1}</value>
|
||||
</data>
|
||||
<data name="utility_showemojis_none" xml:space="preserve">
|
||||
<value>No special emojis found.</value>
|
||||
</data>
|
||||
<data name="utility_stats_songs" xml:space="preserve">
|
||||
<value>Playing {0} songs, {1} queued.</value>
|
||||
</data>
|
||||
<data name="utility_togtub_room_link" xml:space="preserve">
|
||||
<value>Here is your room link:</value>
|
||||
</data>
|
||||
<data name="utility_uptime" xml:space="preserve">
|
||||
<value>Uptime</value>
|
||||
</data>
|
||||
<data name="utility_userid" xml:space="preserve">
|
||||
<value>{0} of the user {1} is {2}</value>
|
||||
<comment>Id of the user kwoth#1234 is 123123123123</comment>
|
||||
</data>
|
||||
</root>
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user