static void Main() { CakeSetup .WithBot(bot => new MyBot()) .WithCommandsExtension('!') .ListenToConsole() .Do(bot => ChatFormatsExtension.LoadInto(bot, new BasicChatSyntaxProvider("Bot"))) .Do(bot => PermissionsExtension.WithCommandsLoadInto(bot, Group.Moderator, new SimplePermissionProvider("processor"))) .AsGuest() .CreateJoinRoomAsync("PW01"); }
public Commands() { InitializeFinish += (sender, e) => { roundsManager = RoundsManager.Of(BotBits); if (!CommandsExtension.IsLoadedInto(BotBits)) { return; } CommandLoader.Of(BotBits).Load(this); requireModerator = PermissionsExtension.IsLoadedInto(BotBits); }; }