Beispiel #1
0
        private void SetupListener()
        {
            var emotes = new List <IEmote>()
            {
                Damage, Card, Ship
            };

            NormalCGs[Card] = new List <string>()
            {
                ShipGirl.CardUrl
            };
            DamagedCGs[Card] = new List <string>()
            {
                ShipGirl.CardUrl
            };
            NormalCGs[Ship] = new List <string>()
            {
                ShipGirl.BaseCG.NormalUrl
            };
            DamagedCGs[Ship] = new List <string>()
            {
                ShipGirl.BaseCG.DamagedUrl
            };
            var shipEmotes = new HashSet <IEmote>();

            foreach (var variant in ShipGirl.CGVariant.Keys)
            {
                var emote = KancolleSeasonalMap.GetEmoji(variant);
                shipEmotes.Add(emote);
                if (!NormalCGs.ContainsKey(emote))
                {
                    NormalCGs[emote] = new List <string>();
                }
                if (!DamagedCGs.ContainsKey(emote))
                {
                    DamagedCGs[emote] = new List <string>();
                }
                NormalCGs[emote].Add(ShipGirl.CGVariant[variant].NormalUrl);
                DamagedCGs[emote].Add(ShipGirl.CGVariant[variant].DamagedUrl);
            }
            emotes.AddRange(shipEmotes);
            Listener = new ReactionListener(KancolleMessage, emotes);
            Listener.Initialize();
            Listener.OnReactionChanged += OnReactionChanged;
        }
Beispiel #2
0
 private void SetupListener()
 {
     Listener = new ReactionListener(HelpMessage, Tabs.Keys);
     Listener.Initialize();
     Listener.OnReactionChanged += UpdateMessageAsync;
 }