Пример #1
0
        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);
        }