Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 1

Discord bot nodejs Tasks

Hi guys, I’m trying to make a function in my discord bot.
Let the bot tell me if there is maintenance at a specific time.
But I want to automate this task …

I would be very helpful if someone knows how I can solve this … cus I’m stuck for a week …

 

 

switch (day) {
    case 1:
      msg.channel.send("Luni este maintenance la ora 3:30 am.")
      break;
    case 2:
      msg.channel.send("Marti nu este maintenance.")
      break;
    case 3:
      msg.channel.send("Miercuri este maintenance la ora 3:30 am.")
      break;
    case 4:
      msg.channel.send("Joi nu este maintenance.")
      break;
    case 5:
      msg.channel.send("Vineri este maintenance la ora 2:00 am.")
      break;
    case 6:
      msg.channel.send("Sambata este maintenance la ora 2:00 am.")
      break;
    case 7:
      msg.channel.send("Duminica nu este maintenance.")
      break;
    default:
  }