Beispiel #1
0
        public static long GetCmdCountOfUser(ulong UserId)
        {
            string Key = $"CMD-COUNT";

            if (StoreHandler.LoadData(UserId, Key) == null)
            {
                StoreHandler.SaveData(UserId, Key, 0);
                return(0);
            }
            else if (long.TryParse(StoreHandler.LoadData(UserId, Key), out long IfSuccess))
            {
                return(IfSuccess);
            }
            else
            {
                StoreHandler.SaveData(UserId, Key, 0);
                return(0);
            }
        }
Beispiel #2
0
 public static void SaveJob(ulong UserId, job arg)
 {
     StoreHandler.SaveData(UserId, "JOB", arg.Name);
     StoreHandler.SaveData(UserId, "JOB-PAY", arg.Pay);
     StoreHandler.SaveData(UserId, "JOB-TIMESTAMP", DateTime.UtcNow);
 }