moved stats to administartion
This commit is contained in:
parent
e07a47c1e9
commit
fc84c0212e
@ -1,5 +1,6 @@
|
|||||||
using Discord.Modules;
|
using Discord.Modules;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace NadekoBot.Modules
|
namespace NadekoBot.Modules
|
||||||
@ -259,6 +260,18 @@ namespace NadekoBot.Modules
|
|||||||
{
|
{
|
||||||
await client.SendMessage(e.Channel, "This server's id is " + e.Server.Id);
|
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));
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -507,17 +507,6 @@ namespace NadekoBot.Modules
|
|||||||
StatsCollector.DEBUG_LOG(ex.ToString());
|
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
|
//TODO add eval
|
||||||
|
Loading…
Reference in New Issue
Block a user