From a3c623c41a83881bf76947a57bd34f8a050efc46 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Tue, 13 Feb 2024 16:44:26 +1100 Subject: [PATCH] Merge Response calls into one. --- src/events/messageCreate.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/events/messageCreate.ts b/src/events/messageCreate.ts index 86de386..c7ec686 100644 --- a/src/events/messageCreate.ts +++ b/src/events/messageCreate.ts @@ -76,10 +76,9 @@ export default class MessageCreate { guildBoost: ['Thanks for boosting our server!', 'Thanks for the boost!', 'We appreciate the boost!', `Thank you for the kind boost, <@${message.author.id}>!`], } const GeneralChatID = ConfigHelper.isDevMode() ? '929807948748832801' : '468835415093411863'; - Response.create(message, GeneralChatID, 'morning'); - Response.create(message, GeneralChatID, 'afternoon'); - Response.create(message, GeneralChatID, 'evening'); - Response.create(message, GeneralChatID, 'night'); + + const times_of_day = ['morning', 'afternoon', 'evening', 'night']; + for (let i = 0; i < times_of_day.length; i++) Response.create(message, GeneralChatID, times_of_day[i]); CmdTrigger.registerCmds(client, message, 'register'); CmdTrigger.MFPwTrigger(message, 'farmpw');