diff options
| author | Sin-MacBook <[email protected]> | 2020-08-12 10:21:18 +0200 |
|---|---|---|
| committer | Sin-MacBook <[email protected]> | 2020-08-12 10:21:18 +0200 |
| commit | 7a133a9f72eede41d95eac171289a315c1ef41f6 (patch) | |
| tree | 03b6d6aa43281d498e4dae31906abf4a86ddb100 /src/modules/suspend.js | |
| parent | ok (diff) | |
| download | modmail-7a133a9f72eede41d95eac171289a315c1ef41f6.tar.xz modmail-7a133a9f72eede41d95eac171289a315c1ef41f6.zip | |
fix: fix formatting errors and neatness
Diffstat (limited to 'src/modules/suspend.js')
| -rw-r--r-- | src/modules/suspend.js | 16 |
1 files changed, 8 insertions, 8 deletions
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!**.`); }); }; |