.ping command added
This commit is contained in:
parent
510a466985
commit
d0380b0cbf
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
@ -3330,6 +3330,15 @@
|
||||
<data name="claimpatreonrewards_usage" xml:space="preserve">
|
||||
<value>`{0}claimpatreonrewards`</value>
|
||||
</data>
|
||||
<data name="ping_cmd" xml:space="preserve">
|
||||
<value>ping</value>
|
||||
</data>
|
||||
<data name="ping_desc" xml:space="preserve">
|
||||
<value>Ping the bot to see if there are latency issues.</value>
|
||||
</data>
|
||||
<data name="ping_usage" xml:space="preserve">
|
||||
<value>`{0}ping`</value>
|
||||
</data>
|
||||
<data name="slowmodewhitelist_cmd" xml:space="preserve">
|
||||
<value>slowmodewl</value>
|
||||
</data>
|
||||
|
Loading…
Reference in New Issue
Block a user