.connectshard added
This commit is contained in:
parent
aaa82dfdfe
commit
58f23ff40b
@ -16,6 +16,29 @@ namespace NadekoBot.Modules.Administration
|
|||||||
[Group]
|
[Group]
|
||||||
class SelfCommands : ModuleBase
|
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]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
[OwnerOnly]
|
[OwnerOnly]
|
||||||
public async Task Leave([Remainder] string guildStr)
|
public async Task Leave([Remainder] string guildStr)
|
||||||
|
27
src/NadekoBot/Resources/CommandStrings.Designer.cs
generated
27
src/NadekoBot/Resources/CommandStrings.Designer.cs
generated
@ -1868,6 +1868,33 @@ namespace NadekoBot.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to connectshard.
|
||||||
|
/// </summary>
|
||||||
|
public static string connectshard_cmd {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("connectshard_cmd", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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..
|
||||||
|
/// </summary>
|
||||||
|
public static string connectshard_desc {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("connectshard_desc", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to `{0}connectshard 2`.
|
||||||
|
/// </summary>
|
||||||
|
public static string connectshard_usage {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("connectshard_usage", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to convert.
|
/// Looks up a localized string similar to convert.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -3060,4 +3060,13 @@
|
|||||||
<data name="shardstats_usage" xml:space="preserve">
|
<data name="shardstats_usage" xml:space="preserve">
|
||||||
<value>`{0}shardstats` or `{0}shardstats 2`</value>
|
<value>`{0}shardstats` or `{0}shardstats 2`</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="connectshard_cmd" xml:space="preserve">
|
||||||
|
<value>connectshard</value>
|
||||||
|
</data>
|
||||||
|
<data name="connectshard_desc" xml:space="preserve">
|
||||||
|
<value>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.</value>
|
||||||
|
</data>
|
||||||
|
<data name="connectshard_usage" xml:space="preserve">
|
||||||
|
<value>`{0}connectshard 2`</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
Loading…
Reference in New Issue
Block a user