예제 #1
0
        public Glue(TwitchBot twitchBot, SteamBot steamBot)
        {
            myLock = new Object();
            this.twitchBot = twitchBot;
            this.steamBot = steamBot;
            subscriptionsUsersMap = new Dictionary<String, HashSet<SteamID>>();
            usersSubscriptionsMap = new Dictionary<SteamID, ISet<String>>();

            adminList = LoadAdmins();

            twitchBot.OnPublicMessage += delegate (UserInfo user, String channel, String message) { log.Debug($"{user.Nick}: {message}"); };
            twitchBot.OnPublicMessage += OnTwitchPublicMessage;
            steamBot.OnFriendMessage += OnSteamFriendMessage;
            steamBot.OnOfflineMessage += steamBot_OnOfflineMessage;

            //TODO: Put into config file?
            smileyTranslater = new StringMapper(new Dictionary<String, String>()
            {
                { "BibleThump", ":steamsad:" },
                { "Kappa", ":steammocking:" },
                { "FailFish", ":steamfacepalm:" },
                { "PJSalt", ":steamsalty:" },
                { "ResidentSleeper", ":steambored:" }
            });
        }
예제 #2
0
 static void Main(string[] args)
 {
     LogTester.Test();
     using (var steamBot = new SteamBot())
     using (var twitchBot = new TwitchBot())
     {
     //    var twitchBot = new TwitchBot2();
         Glue glue = new Glue(twitchBot, steamBot);
         glue.Run();
     }
 }