public async Task Start() { Looter.Init(); string token = Config.Current.Token; client = new DiscordSocketClient(); await client.SetGameAsync("mit deiner Mudda"); commands = new CommandService(); fallback = new ModuleFallback(ReactionLibrary.GetReactions()); services = new ServiceCollection() .AddSingleton(client) .AddSingleton(commands) .AddSingleton(fallback) .BuildServiceProvider(); await InstallCommands(); client.Log += Log; await client.LoginAsync(TokenType.Bot, token); await client.StartAsync(); await Task.Delay(-1); }
public Library(string jsonData) { _instance = this; var dataProxy = JsonConvert.DeserializeObject <LibraryDataProxy>(jsonData); _reagents = new ReagentLibrary(dataProxy.Reagents); _reactions = new ReactionLibrary(dataProxy.Reactions); }