4 |
import CommandOptions from '../../types/CommandOptions'; |
import CommandOptions from '../../types/CommandOptions'; |
5 |
import InteractionOptions from '../../types/InteractionOptions'; |
import InteractionOptions from '../../types/InteractionOptions'; |
6 |
import MessageEmbed from '../../client/MessageEmbed'; |
import MessageEmbed from '../../client/MessageEmbed'; |
|
import Help from '../../utils/help'; |
|
7 |
import ms from 'ms'; |
import ms from 'ms'; |
8 |
import { timeSince } from '../../utils/util'; |
import { timeSince } from '../../utils/util'; |
9 |
import { setTimeoutv2 } from '../../utils/setTimeout'; |
import { setTimeoutv2 } from '../../utils/setTimeout'; |
63 |
|
|
64 |
text = args.join(' '); |
text = args.join(' '); |
65 |
} |
} |
66 |
|
|
67 |
|
if (!channel.send) { |
68 |
|
await msg.reply({ |
69 |
|
content: 'Invalid text channel.', |
70 |
|
ephemeral: true |
71 |
|
}); |
72 |
|
|
73 |
|
return; |
74 |
|
} |
75 |
|
|
76 |
try { |
try { |
77 |
const message = await channel.send({ |
const message = await channel.send({ |
78 |
content: text! |
content: text! |
79 |
}); |
}); |
80 |
|
|
81 |
const timeout = await setTimeoutv2('expire.ts', time, msg.guild!.id, `expire ${time} ${text!} #${channel.name}`, message.id, channel.id, msg.guild!.id); |
const timeout = await setTimeoutv2('expire', time, msg.guild!.id, `expire ${time} ${text!} #${channel.name}`, message.id, channel.id, msg.guild!.id); |
82 |
|
|
83 |
await msg.reply({ |
await msg.reply({ |
84 |
embeds: [ |
embeds: [ |