static void Main(string[] args) { FunCommands funCommands = new FunCommands(); var Bot = new Bot(); Bot.RunAsync().GetAwaiter().GetResult(); }
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); }
// Sets up all the command hooks public static void Init() { DevCommands.Init(); ModerationCommands.Init(); BuildingCommands.Init(); InfoCommands.Init(); WorldCommands.Init(); ZoneCommands.Init(); MaintenanceCommands.Init(); ChatCommands.Init(); FunCommands.Init(); MathCommands.Init(); Logger.Log(LogType.Debug, "CommandManager: {0} commands registered ({1} hidden, {2} aliases)", Commands.Count, GetCommands(true).Length, Aliases.Count); }
public ClasherDynBot() { rand = new Random(); discord = new DiscordClient(x => { x.LogLevel = LogSeverity.Info; x.LogHandler = Log; }); discord.UsingCommands(x => { x.PrefixChar = '!'; x.AllowMentionPrefix = true; }); commands = discord.GetService <CommandService>(); #region register command groups HelpCommands.RegisterHelpCommands(commands, discord); FunCommands.RegisterFunCommands(commands, discord); SettingCommands.RegisterWebsiteCommands(commands, discord); SearchCommands.RegisterSearchCommands(commands, discord); AttendanceCommands.RegisterAttendanceCommands(commands, discord); WarningCommands.RegisterWarningCommands(commands, discord); EnemyNoteCommands.RegisterEnemyNoteCommands(commands, discord); WarCommands.RegisterWarCommands(commands, discord); AdminCommands.RegisterAdminCommands(commands, discord); #endregion discord.ExecuteAndWait(async() => { string key = ConfigurationManager.AppSettings["Key"]; await discord.Connect(key, Discord.TokenType.Bot); //auto start notifications await StartNotifications(); }); }