(msg, [when, ...message])
| 18 | } |
| 19 | |
| 20 | async run(msg, [when, ...message]) { |
| 21 | const sendInDM = message[0].endsWith('-dm'); |
| 22 | if (sendInDM) message[0].replace('-dm', ''); |
| 23 | |
| 24 | await this.client.schedule.create('reminder', when, { |
| 25 | data: { |
| 26 | guildID: msg.guild ? msg.guild.id : null, |
| 27 | channelID: msg.guild ? msg.channel.id : msg.author.id, |
| 28 | userID: msg.author.id, |
| 29 | dmBool: sendInDM, |
| 30 | reminderMsg: message, |
| 31 | timestamp: moment().format() |
| 32 | }, |
| 33 | catchUp: true |
| 34 | }); |
| 35 | |
| 36 | return msg.affirm(); |
| 37 | } |
| 38 | |
| 39 | }; |