Skip to content

Commit

Permalink
commands: Daily: embedded time (#75)
Browse files Browse the repository at this point in the history
* Update Daily.php

* Update Daily.php

* Update Daily.php

* Update Daily.php

* Update Daily.php

* Update Daily.php
  • Loading branch information
wraith4081 authored Jul 28, 2023
1 parent 906cb8d commit e2cb698
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/commands/economy/Daily.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ public function handle($msg, $args): void
}
$user_money = $database->getUserMoney($database->getUserIdByDiscordId($msg->member->id));
$last_daily = $database->getLastDailyForUser($database->getUserIdByDiscordId($msg->member->id));

if (time() - $last_daily < 86400) {
$msg->reply('You must wait 24 hours.');
$msg->reply('You can use this command <t:' . ($last_daily + 86400) . ':R>.');
return;
}

if (!is_numeric($user_money)) {
if (!$database->addUser([
"discord_id" => $msg->member->id
Expand Down

0 comments on commit e2cb698

Please sign in to comment.