Exemplo n.º 1
0
        public void AddGiveaway(GiveawayEntry entry, ulong serverId)
        {
            GiveawaySchedulerData data = new GiveawaySchedulerData(entry, serverId);
            string json = JsonConvert.SerializeObject(data);

            m_scheduler.Add <GiveawayService>(entry.End, nameof(GiveawaySchedulerCallback), json);
        }
Exemplo n.º 2
0
        public void GiveawaySchedulerCallback(string data)
        {
            GiveawaySchedulerData schedulerData = JsonConvert.DeserializeObject <GiveawaySchedulerData>(data);

            _ = ExecuteGiveaway(schedulerData.entry, schedulerData.serverId);
        }