コード例 #1
0
        public Task EightBall(CommandContext ctx,
                              [Description("Question to ask the 8-Ball")][RemainingText] string question = "")
        {
            if (string.IsNullOrWhiteSpace(question))
            {
                return(null);
            }
            var output = new DiscordEmbedBuilder()
                         .WithDescription(":8ball: " + EightBallService.GetRandomAnswer() + " (" + ctx.User.Mention + ")")
                         .WithColor(DiscordColor.Black);

            return(ctx.RespondAsync(embed: output.Build()));
        }
コード例 #2
0
 public EightBallModule(EightBallService eight)
 {
     this.eightBall = eight;
 }
コード例 #3
0
 public void GetRandomAnswer()
 {
     Assert.IsNotNull(EightBallService.GetRandomAnswer());
 }