From 7a133a9f72eede41d95eac171289a315c1ef41f6 Mon Sep 17 00:00:00 2001 From: Sin-MacBook Date: Wed, 12 Aug 2020 10:21:18 +0200 Subject: fix: fix formatting errors and neatness --- src/modules/suspend.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/modules/suspend.js') diff --git a/src/modules/suspend.js b/src/modules/suspend.js index 7edd096..87dba68 100644 --- a/src/modules/suspend.js +++ b/src/modules/suspend.js @@ -12,7 +12,7 @@ module.exports = ({ bot, knex, config, commands }) => { for (const thread of threadsToBeSuspended) { if (thread.status === THREAD_STATUS.OPEN) { await thread.suspend(); - await thread.postSystemMessage(`**Thread suspended** as scheduled by ${thread.scheduled_suspend_name}. This thread will act as closed until unsuspended with \`!unsuspend\``); + await thread.postSystemMessage(`**Thread suspended** as scheduled by ${thread.scheduled_suspend_name}. This thread will act as closed until unsuspended with \`!unsuspend\`.`); } } } @@ -33,9 +33,9 @@ module.exports = ({ bot, knex, config, commands }) => { // Cancel timed suspend if (thread.scheduled_suspend_at) { await thread.cancelScheduledSuspend(); - thread.postSystemMessage(`Cancelled scheduled suspension`); + thread.postSystemMessage(`Cancelled scheduled suspension.`); } else { - thread.postSystemMessage(`Thread is not scheduled to be suspended`); + thread.postSystemMessage(`Thread is not scheduled to be suspended.`); } }); @@ -50,28 +50,28 @@ module.exports = ({ bot, knex, config, commands }) => { } await thread.suspend(); - thread.postSystemMessage(`**Thread suspended!** This thread will act as closed until unsuspended with \`!unsuspend\``); + thread.postSystemMessage(`**Thread suspended!** This thread will act as closed until unsuspended with \`!unsuspend\`.`); }); commands.addInboxServerCommand('unsuspend', [], async (msg, args, thread) => { if (thread) { - thread.postSystemMessage(`Thread is not suspended`); + thread.postSystemMessage(`Thread is not suspended.`); return; } thread = await threads.findSuspendedThreadByChannelId(msg.channel.id); if (! thread) { - thread.postSystemMessage(`Not in a thread`); + thread.postSystemMessage(`Not in a thread.`); return; } const otherOpenThread = await threads.findOpenThreadByUserId(thread.user_id); if (otherOpenThread) { - thread.postSystemMessage(`Cannot unsuspend; there is another open thread with this user: <#${otherOpenThread.channel_id}>`); + thread.postSystemMessage(`Cannot unsuspend; there is another open thread with this user: <#${otherOpenThread.channel_id}>.`); return; } await thread.unsuspend(); - thread.postSystemMessage(`**Thread unsuspended!**`); + thread.postSystemMessage(`**Thread unsuspended!**.`); }); }; -- cgit v1.2.3