From fc84c0212e77aa3e0dc5d65f8b0352992d313b5b Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 8 Dec 2015 23:25:16 +0100 Subject: [PATCH] moved stats to administartion --- NadekoBot/Modules/Administration.cs | 13 +++++++++++++ NadekoBot/Modules/Conversations.cs | 11 ----------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/NadekoBot/Modules/Administration.cs b/NadekoBot/Modules/Administration.cs index f769bf2a..5fd2fb7e 100644 --- a/NadekoBot/Modules/Administration.cs +++ b/NadekoBot/Modules/Administration.cs @@ -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)); + }); }); } diff --git a/NadekoBot/Modules/Conversations.cs b/NadekoBot/Modules/Conversations.cs index 6068316f..98e1b1fa 100644 --- a/NadekoBot/Modules/Conversations.cs +++ b/NadekoBot/Modules/Conversations.cs @@ -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