Skip to content

Start Bot

Назар edited this page Sep 11, 2018 · 4 revisions

Startup

Bot = new Bot(
                key: "Your key",
                name: "botname",
                nameString: "String name of bot", //Expaple: Goloros, Rapira, Sistence, etc.
                usernameofcreator:"yourusername", //Can be null
                modules: new List<IModule> { //Some of ur modules
                    new SaveLoadModule(60,30*60),
                    new Statistic(),
                }
            );

Activate Commands of modules

Yes, some modules have their own commands.

            Bot.SynkCommands.Add(Bot.GetModule<LikeDislikeModule>().Command);
            Bot.SynkCommands.Add(new Pes7BotCrator.Commands.Help());
            Bot.SynkCommands.Add(Bot.GetModule<Statistic>().CommandHelp);
            Bot.SynkCommands.Add(Bot.GetModule<Statistic>().CommandRuntime);

In the end

Bot.Start();

Next Page

Clone this wiki locally