mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-05-01 03:29:54 +03:00
Use DateTimeOffset#UtcNow instead of DateTimeOffset#Now (UtcNow is actually faster lol)
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
41958deb0a
commit
cdfa0e11f7
8 changed files with 28 additions and 21 deletions
|
@ -7,7 +7,8 @@ public sealed class PingCommand : ICommand {
|
|||
var builder = Boyfriend.StringBuilder;
|
||||
|
||||
builder.Append(Utils.GetBeep())
|
||||
.Append(Math.Round(Math.Abs(DateTimeOffset.Now.Subtract(cmd.Context.Message.Timestamp).TotalMilliseconds)))
|
||||
.Append(
|
||||
Math.Round(Math.Abs(DateTimeOffset.UtcNow.Subtract(cmd.Context.Message.Timestamp).TotalMilliseconds)))
|
||||
.Append(Messages.Milliseconds);
|
||||
|
||||
cmd.Reply(builder.ToString(), ReplyEmojis.Ping);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue