feat(*): Disable the automatic channel deletion

This commit is contained in:
2020-11-22 10:29:08 +00:00
parent 6cef805649
commit 628c063c15
+7 -6
View File
@@ -207,15 +207,16 @@ function makeTempChannel(message, adventureMessage) {
// Post in the channel // Post in the channel
createdChannel.send(adventureMessage); createdChannel.send(adventureMessage);
createdChannel.send(`Please delete this channel when you're finished with it using the ${config.prefix}dc command`);
}) })
.catch(logger.error); .catch(logger.error);
try { // try {
// Delete the channel after the configured amount of minutes // // Delete the channel after the configured amount of minutes
setTimeout(function(){ deleteChannel(message, channelName); }, (config.channeldeletetimeinminutes * 1000 * 60) ); // setTimeout(function(){ deleteChannel(message, channelName); }, (config.channeldeletetimeinminutes * 1000 * 60) );
} catch (error) { // } catch (error) {
logger.error(`Tried to delete channel ${channelName} after timeout: `, error); // logger.error(`Tried to delete channel ${channelName} after timeout: `, error);
} // }
} }
function deleteChannel(message, channelName) { function deleteChannel(message, channelName) {