diff --git a/src/NadekoBot/Modules/Utility/Utility.cs b/src/NadekoBot/Modules/Utility/Utility.cs
index ee92b771..1ac77e73 100644
--- a/src/NadekoBot/Modules/Utility/Utility.cs
+++ b/src/NadekoBot/Modules/Utility/Utility.cs
@@ -16,6 +16,7 @@ using System.Collections.Generic;
using Newtonsoft.Json;
using Discord.WebSocket;
using NadekoBot.Services;
+using System.Diagnostics;
namespace NadekoBot.Modules.Utility
{
@@ -494,5 +495,16 @@ namespace NadekoBot.Modules.Utility
await Context.User.SendFileAsync(
await JsonConvert.SerializeObject(grouping, Formatting.Indented).ToStream().ConfigureAwait(false), title, title).ConfigureAwait(false);
}
+ [NadekoCommand, Usage, Description, Aliases]
+ [RequireContext(ContextType.Guild)]
+ public async Task Ping()
+ {
+ var sw = Stopwatch.StartNew();
+ var msg = await Context.Channel.SendMessageAsync("🏓").ConfigureAwait(false);
+ sw.Stop();
+ msg.DeleteAfter(0);
+
+ await Context.Channel.SendConfirmAsync($"{Format.Bold(Context.User.ToString())} 🏓 {(int)sw.Elapsed.TotalMilliseconds}ms").ConfigureAwait(false);
+ }
}
}
\ No newline at end of file
diff --git a/src/NadekoBot/Resources/CommandStrings.resx b/src/NadekoBot/Resources/CommandStrings.resx
index f3662ef3..83d9659b 100644
--- a/src/NadekoBot/Resources/CommandStrings.resx
+++ b/src/NadekoBot/Resources/CommandStrings.resx
@@ -3330,6 +3330,15 @@
`{0}claimpatreonrewards`
+
+ ping
+
+
+ Ping the bot to see if there are latency issues.
+
+
+ `{0}ping`
+
slowmodewl