public CommandHandler(IServiceProvider services, DiscordSocketClient client, CommandService commands, BotDefinition botDefinition) { _commands = commands; _client = client; this.services = services; this.botDefinition = botDefinition; }
private bool LoadBotDefinition() { string bd = SaveLoadService.Load("botdefinition.json"); if (bd != null) { botDefinition = JsonConvert.DeserializeObject <BotDefinition>(bd); try { token = botDefinition.GetCurrent().token; return(true); } catch { return(false); } } return(false); }
public void AddBot(BotDefinition definition) { _bots = _bots.Append(definition).ToHashSet(); }