コード例 #1
0
 public async Task CountAsync(
     [Summary("The reaction to be counted.")]
     IEmote emoteToCount,
     [Summary("The channel to count.")]
     ISocketMessageChannel collectionChannel,
     [Summary("A list of roles that a message author must have at least one of, space separated.")]
     params IRole[] roles)
 {
     await _contestService.CollectDataAsync(emoteToCount, collectionChannel, Context.Channel as ISocketMessageChannel, roles);
 }
コード例 #2
0
 public async Task CountAsync(
     [Summary("The reaction to be counted.")]
     IEmote emoteToCount,
     [Summary("The channel to count.")]
     ISocketMessageChannel collectionChannel,
     [Summary("A list of roles that a message author must have at least one of, space separated.")]
     params IRole[] roles)
 {
     try
     {
         await _contestService.CollectDataAsync(emoteToCount, collectionChannel, Context.Channel as ISocketMessageChannel, roles);
     }
     catch (InvalidOperationException ex)
     {
         await ReplyAsync(embed : new EmbedBuilder()
                          .WithTitle("Error")
                          .WithDescription(ex.Message)
                          .Build());
     }
 }