コード例 #1
0
        public async Task AdminHelp()
        {
            if (Funcs.IsAdmin(Context.User))
            {
                JEmbed emb = new JEmbed();
                emb.Author.Name  = "Shenron Admin Commands";
                emb.ThumbnailUrl = Context.User.AvatarId;
                emb.ColorStripe  = Constants.Colours.SHENRON_GREEN;

                foreach (CommandInfo command in Bot.commands.Commands)
                {
                    if (command.Summary == null)
                    {
                        emb.Fields.Add(new JEmbedField(x =>
                        {
                            string header = "db!" + command.Name;
                            foreach (ParameterInfo parameter in command.Parameters)
                            {
                                header += " [" + parameter.Name + "]";
                            }
                            x.Header = header;
                            x.Text   = "";
                        }));
                    }
                }

                await Context.Channel.SendMessageAsync("", embed : emb.Build());
            }
        }
コード例 #2
0
 public async Task Start()
 {
     if (Funcs.IsAdmin(Context.User))
     {
         Bot.sess = new DBSession();
         Bot.sess.LaunchBalls();
         await Context.Channel.SendMessageAsync("Seven Dragon Balls ascend and launch through the sky in different directions.");
     }
 }