1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-01-31 17:19:00 +03:00
Octobot/Boyfriend/Commands/PingCommand.cs

19 lines
593 B
C#
Raw Normal View History

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-05-14 16:12:24 +03:00
public override Task Run(SocketCommandContext context, string[] args) {
var builder = Boyfriend.StringBuilder;
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-05-14 16:12:24 +03:00
return Task.CompletedTask;
}
2022-05-14 16:12:24 +03:00
}