.ping command added
This commit is contained in:
parent
510a466985
commit
d0380b0cbf
@ -16,6 +16,7 @@ using System.Collections.Generic;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Discord.WebSocket;
|
using Discord.WebSocket;
|
||||||
using NadekoBot.Services;
|
using NadekoBot.Services;
|
||||||
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace NadekoBot.Modules.Utility
|
namespace NadekoBot.Modules.Utility
|
||||||
{
|
{
|
||||||
@ -494,5 +495,16 @@ namespace NadekoBot.Modules.Utility
|
|||||||
await Context.User.SendFileAsync(
|
await Context.User.SendFileAsync(
|
||||||
await JsonConvert.SerializeObject(grouping, Formatting.Indented).ToStream().ConfigureAwait(false), title, title).ConfigureAwait(false);
|
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">
|
<data name="claimpatreonrewards_usage" xml:space="preserve">
|
||||||
<value>`{0}claimpatreonrewards`</value>
|
<value>`{0}claimpatreonrewards`</value>
|
||||||
</data>
|
</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">
|
<data name="slowmodewhitelist_cmd" xml:space="preserve">
|
||||||
<value>slowmodewl</value>
|
<value>slowmodewl</value>
|
||||||
</data>
|
</data>
|
||||||
|
Loading…
Reference in New Issue
Block a user