mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 08:34:27 -05:00 
			
		
		
		
	Fixed a patreon reward bug and coinmarketcap ratelimit issue
This commit is contained in:
		@@ -79,7 +79,7 @@ public class CryptoService : INService
 | 
			
		||||
                    }
 | 
			
		||||
                },
 | 
			
		||||
                "",
 | 
			
		||||
                TimeSpan.FromHours(1));
 | 
			
		||||
                TimeSpan.FromHours(2));
 | 
			
		||||
 | 
			
		||||
            return JsonConvert.DeserializeObject<CryptoResponse>(fullStrData)?.Data ?? new();
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -264,7 +264,7 @@ public class PatreonRewardsService : INService, IReadyExecutor
 | 
			
		||||
                var toAward = eligibleFor - usr.AmountRewardedThisMonth;
 | 
			
		||||
 | 
			
		||||
                usr.LastReward = now;
 | 
			
		||||
                usr.AmountRewardedThisMonth = toAward;
 | 
			
		||||
                usr.AmountRewardedThisMonth = eligibleFor;
 | 
			
		||||
                await uow.SaveChangesAsync();
 | 
			
		||||
 | 
			
		||||
                await _currency.AddAsync(userId, toAward, new("patreon", "update"));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user