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:
parent
b486d2d3d9
commit
c220a0f379
27 changed files with 52 additions and 76 deletions
Commands
18
Commands/PingCommand.cs
Normal file
18
Commands/PingCommand.cs
Normal 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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue