Files
Discord.Net/samples/ShardedClient/Modules/PublicModule.cs
Mihail Gribkov e2e8c0fd6a Update sample projects & samples in docs (#2823)
* update them all

* more docs

* moar docs
2024-01-11 15:25:56 +00:00

17 lines
533 B
C#

using Discord.Commands;
using System.Threading.Tasks;
namespace ShardedClient.Modules;
// Remember to make your module reference the ShardedCommandContext
public class PublicModule : ModuleBase<ShardedCommandContext>
{
[Command("info")]
public async Task InfoAsync()
{
var msg = $@"Hi {Context.User}! There are currently {Context.Client.Shards.Count} shards!
This guild is being served by shard number {Context.Client.GetShardFor(Context.Guild).ShardId}";
await ReplyAsync(msg);
}
}