Example #1
0
        public CommandSource(CommandsHandler handler, BotLog log)
        {
            this._Utils    = new UtilsCommands();
            this._Social   = new SocialCommands();
            this._NSFW     = new NSFWCommands();
            this._Search   = new SearchCommands();
            this._Image    = new ImageCommands();
            this._Fun      = new FunCommands();
            this._Warframe = new WarframeCommands();

            Setup(handler, log);
        }
        public async Task Install(IServiceProvider _services)
        {
            // Create Command Service, inject it into Dependency Map
            client   = _services.GetService <DiscordSocketClient>();
            commands = new CommandService();
            //_map.Add(commands);
            services = _services;
            config   = _services.GetService <Config>();

            await commands.AddModulesAsync(Assembly.GetEntryAssembly(), services);

            images = new ImageCommands(commands, services, config);

            //await HelpModule.Install(commands);

            client.MessageReceived += HandleCommand;
        }