!changelog command, slightly improved info command, foundation for voice features
This commit is contained in:
parent
12919acf95
commit
b45370cf9e
5 changed files with 219 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
using Discord.Commands;
|
||||
|
@ -14,12 +15,14 @@ namespace Geekbot.net.Commands
|
|||
private readonly IDatabase _redis;
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
private readonly DiscordSocketClient _client;
|
||||
private readonly CommandService _commands;
|
||||
|
||||
public Info(IDatabase redis, IErrorHandler errorHandler, DiscordSocketClient client)
|
||||
public Info(IDatabase redis, IErrorHandler errorHandler, DiscordSocketClient client, CommandService commands)
|
||||
{
|
||||
_redis = redis;
|
||||
_errorHandler = errorHandler;
|
||||
_client = client;
|
||||
_commands = commands;
|
||||
}
|
||||
|
||||
[Command("info", RunMode = RunMode.Async)]
|
||||
|
@ -38,10 +41,13 @@ namespace Geekbot.net.Commands
|
|||
var uptime = (DateTime.Now.Subtract(Process.GetCurrentProcess().StartTime));
|
||||
|
||||
eb.AddInlineField("Bot Name", _client.CurrentUser.Username);
|
||||
eb.AddInlineField("Servers", Context.Client.GetGuildsAsync().Result.Count);
|
||||
eb.AddInlineField("Uptime", $"{uptime.Days}D {uptime.Hours}H {uptime.Minutes}M {uptime.Seconds}S");
|
||||
eb.AddInlineField("Bot Owner", $"{botOwner.Username}#{botOwner.Discriminator}");
|
||||
eb.AddInlineField("Website", "https://geekbot.pizzaandcoffee.rocks/");
|
||||
eb.AddInlineField("Library", "Discord.NET V1.0.2");
|
||||
eb.AddInlineField("Uptime", $"{uptime.Days}D {uptime.Hours}H {uptime.Minutes}M {uptime.Seconds}S");
|
||||
eb.AddInlineField("Servers", Context.Client.GetGuildsAsync().Result.Count);
|
||||
eb.AddInlineField("Total Commands", _commands.Commands.Count());
|
||||
|
||||
eb.AddField("Website", "https://geekbot.pizzaandcoffee.rocks/");
|
||||
|
||||
await ReplyAsync("", false, eb.Build());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue