1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-04-30 11:09:54 +03:00

Add /about command

This commit is contained in:
Macintxsh 2023-07-03 19:37:24 +03:00
parent 3f957b375b
commit 3b3e313959
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 57156EBA2C282D9A
7 changed files with 1445 additions and 829 deletions

View file

@ -36,6 +36,12 @@ public class PingCommandGroup : CommandGroup {
_userApi = userApi;
}
/// <summary>
/// A slash command that shows time taken for the gateway to respond to the last heartbeat.
/// </summary>
/// <returns>
/// A feedback sending result which may or may not have succeeded.
/// </returns>
[Command("ping", "пинг")]
[Description("получает задержку")]
public async Task<Result> GetPingAsync() {
@ -60,12 +66,6 @@ public class PingCommandGroup : CommandGroup {
latency = DateTimeOffset.UtcNow.Subtract(lastMessage.Single().Timestamp).TotalMilliseconds;
}
// var embed = new EmbedBuilder().WithTitle($"Beep{Random.Shared.Next(1, 4)}".Localized())
// .WithDescription($"{latency:F0}{Messages.Milliseconds}")
// .WithColour(ColorsList.Green)
// .WithUserFooter(currentUser)
// .WithCurrentTimestamp()
// .Build();
var embed = new EmbedBuilder().WithSmallTitle(currentUser.GetTag(), currentUser)
.WithTitle($"Beep{Random.Shared.Next(1, 4)}".Localized())
.WithDescription($"{latency:F0}{Messages.Milliseconds}")