コード例 #1
0
ファイル: ManualCommand.cs プロジェクト: RoidRunner/BotCore
 protected override Task Execute(IDMCommandContext context)
 {
     if (collection != null)
     {
         return(CommandManual.SendCommandCollectionHelp(context, collection));
     }
     else if (command != null)
     {
         return(CommandManual.SendCommandHelp(context, command));
     }
     else
     {
         return(CommandManual.SendHelpList(context));
     }
 }
コード例 #2
0
        protected override Task Execute(IDMCommandContext context, object argObj)
        {
            ArgumentContainer args = argObj as ArgumentContainer;

            if (args != null)
            {
                if (args.collection != null)
                {
                    return(CommandManual.SendCommandCollectionHelp(context, args.collection));
                }
                else if (args.command != null)
                {
                    return(CommandManual.SendCommandHelp(context, args.command));
                }
            }
            return(CommandManual.SendHelpList(context));
        }