Self-destructing water relay

This commit is contained in:
Skylar Grant 2023-02-20 14:14:54 -05:00
parent 663ef2297b
commit 8bc80dfaa8

View File

@ -688,7 +688,12 @@ const functions = {
async sendWaterReminder(guildInfo, message, channelId, guild) {
const reminderChannel = await guild.channels.fetch(channelId);
const reminderEmbed = functions.builders.waterReminderEmbed(message, guildInfo);
await reminderChannel.send(reminderEmbed).catch(err => {
await reminderChannel.send(reminderEmbed).then(async m => {
if (!m.deletable) return;
await this.sleep(500).then(async () => {
await m.delete().catch(e => console.error(e));
});
}).catch(err => {
console.error(err);
});
},