diff --git a/src/NadekoBot/Modules/Administration/Commands/SelfCommands.cs b/src/NadekoBot/Modules/Administration/Commands/SelfCommands.cs
index 80356f73..fb316beb 100644
--- a/src/NadekoBot/Modules/Administration/Commands/SelfCommands.cs
+++ b/src/NadekoBot/Modules/Administration/Commands/SelfCommands.cs
@@ -16,6 +16,29 @@ namespace NadekoBot.Modules.Administration
[Group]
class SelfCommands : ModuleBase
{
+ [NadekoCommand, Usage, Description, Aliases]
+ [OwnerOnly]
+ public async Task ConnectShard(int shardid)
+ {
+ var shard = NadekoBot.Client.GetShard(shardid);
+
+ if (shard == null)
+ {
+ await Context.Channel.SendErrorAsync("No shard by that id found.").ConfigureAwait(false);
+ return;
+ }
+ try
+ {
+ await Context.Channel.SendConfirmAsync($"Shard **#{shardid}** reconnecting.").ConfigureAwait(false);
+ await shard.ConnectAsync().ConfigureAwait(false);
+ await Context.Channel.SendConfirmAsync($"Shard **#{shardid}** reconnected.").ConfigureAwait(false);
+ }
+ catch (Exception ex)
+ {
+ _log.Warn(ex);
+ }
+ }
+
[NadekoCommand, Usage, Description, Aliases]
[OwnerOnly]
public async Task Leave([Remainder] string guildStr)
diff --git a/src/NadekoBot/Resources/CommandStrings.Designer.cs b/src/NadekoBot/Resources/CommandStrings.Designer.cs
index 0a7ff768..2be25567 100644
--- a/src/NadekoBot/Resources/CommandStrings.Designer.cs
+++ b/src/NadekoBot/Resources/CommandStrings.Designer.cs
@@ -1868,6 +1868,33 @@ namespace NadekoBot.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to connectshard.
+ ///
+ public static string connectshard_cmd {
+ get {
+ return ResourceManager.GetString("connectshard_cmd", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Try (re)connecting a shard with a certain shardid when it dies. No one knows will it work. Keep an eye on the console for errors..
+ ///
+ public static string connectshard_desc {
+ get {
+ return ResourceManager.GetString("connectshard_desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to `{0}connectshard 2`.
+ ///
+ public static string connectshard_usage {
+ get {
+ return ResourceManager.GetString("connectshard_usage", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to convert.
///
diff --git a/src/NadekoBot/Resources/CommandStrings.resx b/src/NadekoBot/Resources/CommandStrings.resx
index d6074104..a0cd8924 100644
--- a/src/NadekoBot/Resources/CommandStrings.resx
+++ b/src/NadekoBot/Resources/CommandStrings.resx
@@ -3060,4 +3060,13 @@
`{0}shardstats` or `{0}shardstats 2`
+
+ connectshard
+
+
+ Try (re)connecting a shard with a certain shardid when it dies. No one knows will it work. Keep an eye on the console for errors.
+
+
+ `{0}connectshard 2`
+
\ No newline at end of file