mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-06 22:44:32 +02:00
Timer max time
This commit is contained in:
@@ -24,6 +24,7 @@ module.exports = class RemindCommand extends Command {
|
||||
const exists = await this.client.timers.exists(msg.channel.id, msg.author.id);
|
||||
if (exists) return msg.reply('Only one reminder can be set per channel per user.');
|
||||
const timeMs = time.startDate.getTime() - Date.now();
|
||||
if (timeMs > 0x7FFFFFFF) return msg.reply('Reminders have a maximum length of ~24.84 days.');
|
||||
const display = moment().add(timeMs, 'ms').fromNow();
|
||||
const title = time.eventTitle ? shorten(time.eventTitle, 500) : 'something';
|
||||
await this.client.timers.setTimer(msg.channel.id, timeMs, msg.author.id, title);
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "119.45.0",
|
||||
"version": "119.45.1",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user