1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-05-17 19:24:44 +03:00

Rename solution & project, move the project files one layer up

This commit is contained in:
Octol1ttle 2023-01-18 20:17:33 +05:00
parent b486d2d3d9
commit c220a0f379
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
27 changed files with 52 additions and 76 deletions

18
Commands/PingCommand.cs Normal file
View file

@ -0,0 +1,18 @@
namespace Boyfriend.Commands;
public sealed class PingCommand : ICommand {
public string[] Aliases { get; } = { "ping", "latency", "pong", "пинг", "задержка", "понг" };
public Task RunAsync(CommandProcessor cmd, string[] args, string[] cleanArgs) {
var builder = Boyfriend.StringBuilder;
builder.Append(Utils.GetBeep())
.Append(Math.Round(Math.Abs(DateTimeOffset.Now.Subtract(cmd.Context.Message.Timestamp).TotalMilliseconds)))
.Append(Messages.Milliseconds);
cmd.Reply(builder.ToString(), ReplyEmojis.Ping);
builder.Clear();
return Task.CompletedTask;
}
}