diff --git a/src/client/client.ts b/src/client/client.ts index 2dd9a29..384843d 100644 --- a/src/client/client.ts +++ b/src/client/client.ts @@ -79,7 +79,7 @@ export class CoreClient extends Client { .then(() => { AppLogger.LogInfo("Client", "App Data Source Initialised"); - const timerId = this._timerHelper.AddTimer("*/30 * * * * *", "Europe/London", GiveCurrency, false); + const timerId = this._timerHelper.AddTimer("*/20 * * * *", "Europe/London", GiveCurrency, false); this._timerHelper.StartTimer(timerId); }) .catch(err => { diff --git a/src/constants/CardConstants.ts b/src/constants/CardConstants.ts index dfc89b8..0a87e22 100644 --- a/src/constants/CardConstants.ts +++ b/src/constants/CardConstants.ts @@ -1,5 +1,6 @@ export default class CardConstants { public static readonly ClaimCost = 10; + public static readonly TimerGiveAmount = 10; public static readonly DailyCurrency = 100; public static readonly StartingCurrency = 300; } \ No newline at end of file diff --git a/src/timers/GiveCurrency.ts b/src/timers/GiveCurrency.ts index ad1a21a..c292025 100644 --- a/src/timers/GiveCurrency.ts +++ b/src/timers/GiveCurrency.ts @@ -1,4 +1,5 @@ import AppLogger from "../client/appLogger"; +import CardConstants from "../constants/CardConstants"; import User from "../database/entities/app/User"; export default async function GiveCurrency() { @@ -7,10 +8,10 @@ export default async function GiveCurrency() { const users = await User.FetchAll(User); for (const user of users) { - user.AddCurrency(5); + user.AddCurrency(CardConstants.TimerGiveAmount); } User.SaveAll(User, users); - AppLogger.LogInfo("Timers/GiveCurrency", `Successfully gave +5 currency to ${users.length} users`); + AppLogger.LogInfo("Timers/GiveCurrency", `Successfully gave +${CardConstants.TimerGiveAmount} currency to ${users.length} users`); } \ No newline at end of file