mirror of
https://github.com/danbulant/ssps-bot
synced 2026-06-19 06:11:31 +00:00
přeskočení víkendu v suplování
This commit is contained in:
parent
9f3ff7b345
commit
13575b33f3
1 changed files with 1 additions and 0 deletions
|
|
@ -18,6 +18,7 @@ module.exports = class suplovani extends commando.Command {
|
|||
async run(msg) {
|
||||
let date = DateTime.now();
|
||||
if(date.hour > 16) date = date.plus({ days: 1 }); // show tomorrow supplementations after 4PM
|
||||
if(date.weekday > 5) date = date.plus({ days: 8 - weekday});
|
||||
const supplementations = await api.getSupplementations(date);
|
||||
|
||||
const embed = new MessageEmbed();
|
||||
|
|
|
|||
Loading…
Reference in a new issue