2022-01-18 20:38:15 +03:00
|
|
|
|
using Discord.Commands;
|
|
|
|
|
|
|
|
|
|
namespace Boyfriend.Commands;
|
|
|
|
|
|
|
|
|
|
public class PingCommand : Command {
|
2022-05-14 16:12:24 +03:00
|
|
|
|
public override string[] Aliases { get; } = {"ping", "latency", "pong", "пинг", "задержка", "понг"};
|
|
|
|
|
public override int ArgsLengthRequired => 0;
|
2022-01-18 20:38:15 +03:00
|
|
|
|
|
2022-05-14 16:12:24 +03:00
|
|
|
|
public override Task Run(SocketCommandContext context, string[] args) {
|
|
|
|
|
var builder = Boyfriend.StringBuilder;
|
2022-01-18 20:38:15 +03:00
|
|
|
|
|
2022-05-14 16:12:24 +03:00
|
|
|
|
builder.Append(Utils.GetBeep()).Append(Boyfriend.Client.Latency).Append(Messages.Milliseconds);
|
|
|
|
|
|
|
|
|
|
Output(ref builder);
|
|
|
|
|
builder.Clear();
|
2022-01-18 20:38:15 +03:00
|
|
|
|
|
2022-05-14 16:12:24 +03:00
|
|
|
|
return Task.CompletedTask;
|
2022-01-18 20:38:15 +03:00
|
|
|
|
}
|
2022-05-14 16:12:24 +03:00
|
|
|
|
}
|