Updated commandlist. Goodbye clash of clans 👋 closes #1420

This commit is contained in:
Master Kwoth
2017-07-18 04:25:30 +02:00
parent c054543d98
commit 55b1c3945b
3 changed files with 9 additions and 54 deletions

View File

@ -1480,7 +1480,7 @@
<value>stop s</value>
</data>
<data name="stop_desc" xml:space="preserve">
<value>Stops the music and clears the playlist. Stays in the channel.</value>
<value>Stops the music and preserves the current song index. Stays in the channel.</value>
</data>
<data name="stop_usage" xml:space="preserve">
<value>`{0}s`</value>
@ -1642,7 +1642,7 @@
<value>songremove srm</value>
</data>
<data name="songremove_desc" xml:space="preserve">
<value>Remove a song by its # in the queue, or 'all' to remove all songs from the queue.</value>
<value>Remove a song by its # in the queue, or 'all' to remove all songs from the queue and reset the song index.</value>
</data>
<data name="songremove_usage" xml:space="preserve">
<value>`{0}srm 5`</value>

View File

@ -12,7 +12,7 @@ namespace NadekoBot
public class ShardsCoordinator
{
private readonly BotCredentials _creds;
private readonly Process[] ShardProcesses;
private readonly Process[] _shardProcesses;
public ShardComMessage[] Statuses { get; }
public int GuildCount => Statuses.ToArray()
.Where(x => x != null)
@ -27,7 +27,7 @@ namespace NadekoBot
{
LogSetup.SetupLogger();
_creds = new BotCredentials();
ShardProcesses = new Process[_creds.TotalShards];
_shardProcesses = new Process[_creds.TotalShards];
Statuses = new ShardComMessage[_creds.TotalShards];
_log = LogManager.GetCurrentClassLogger();
_port = port;
@ -72,39 +72,9 @@ namespace NadekoBot
{
_log.Error(ex);
}
//await Task.Run(() =>
//{
// string input;
// while ((input = Console.ReadLine()?.ToLowerInvariant()) != "quit")
// {
// try
// {
// switch (input)
// {
// case "ls":
// var groupStr = string.Join(",", Statuses
// .ToArray()
// .Where(x => x != null)
// .GroupBy(x => x.ConnectionState)
// .Select(x => x.Count() + " " + x.Key));
// _log.Info(string.Join("\n", Statuses
// .ToArray()
// .Where(x => x != null)
// .Select(x => $"Shard {x.ShardId} is in {x.ConnectionState.ToString()} state with {x.Guilds} servers. {(DateTime.UtcNow - x.Time).ToString(@"hh\:mm\:ss")} ago")) + "\n" + groupStr);
// break;
// default:
// break;
// }
// }
// catch (Exception ex)
// {
// _log.Warn(ex);
// }
// }
//});
await Task.Delay(-1);
foreach (var p in ShardProcesses)
foreach (var p in _shardProcesses)
{
try { p.Kill(); } catch { }
try { p.Dispose(); } catch { }