You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

PublicModule.cs 575 B

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