moved stats to administartion

This commit is contained in:
Kwoth 2015-12-08 23:25:16 +01:00
parent e07a47c1e9
commit fc84c0212e
2 changed files with 13 additions and 11 deletions

View File

@ -1,5 +1,6 @@
using Discord.Modules;
using System;
using System.Diagnostics;
using System.Linq;
namespace NadekoBot.Modules
@ -259,6 +260,18 @@ namespace NadekoBot.Modules
{
await client.SendMessage(e.Channel, "This server's id is " + e.Server.Id);
});
cgb.CreateCommand(".stats")
.Description("Shows some basic stats for nadeko")
.Do(async e =>
{
int serverCount = client.AllServers.Count();
int uniqueUserCount = client.AllUsers.Count();
var time = (DateTime.Now - Process.GetCurrentProcess().StartTime);
string uptime = " " + time.Days + " days, " + time.Hours + " hours, and " + time.Minutes + " minutes.";
await client.SendMessage(e.Channel, String.Format("```Servers: {0}\nUnique Users: {1}\nUptime: {2}\nMy id is: {3}```", serverCount, uniqueUserCount, uptime, client.CurrentUserId));
});
});
}

View File

@ -507,17 +507,6 @@ namespace NadekoBot.Modules
StatsCollector.DEBUG_LOG(ex.ToString());
}
});
CreateCommand(cgb, "stats")
.Description("Shows some basic stats for nadeko")
.Do(async e =>
{
int serverCount = client.AllServers.Count();
int uniqueUserCount = client.AllUsers.Count();
var time = (DateTime.Now - Process.GetCurrentProcess().StartTime);
string uptime = " " + time.Days + " days, " + time.Hours + " hours, and " + time.Minutes + " minutes.";
await client.SendMessage(e.Channel, String.Format("```Servers: {0}\nUnique Users: {1}\nUptime: {2}\nMy id is: {3}```", serverCount, uniqueUserCount, uptime, client.CurrentUserId));
});
//TODO add eval