From b91faa3e18cc9a06228120bf08ec1edb768b2855 Mon Sep 17 00:00:00 2001 From: DaInfLoop Date: Wed, 19 Jun 2024 21:27:12 +0100 Subject: [PATCH] feat: add rank based responses for /chooseopponent --- index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index cfa9ada..cc0a375 100644 --- a/index.js +++ b/index.js @@ -110,6 +110,12 @@ app.view("chooseopponent", async (ctx) => { const rank = selected_option.value; + const messages = { + "SPECIAL": `*Battle Special*: Wasn't expecting to see ya here <@${ctx.body.user.id}>... I guess you're up for a challenge huh? Alright then, who do ya wanna annoy today?`, + "BEGINNER": `*Battle Beginner*: Hey there <@${ctx.body.user.id}>! Let's keep things simple, who do you want to battle against?`, + "CASUAL": `*Battle Casual*: Alright <@${ctx.body.user.id}>, things are about to get a little bit tougher from here... Who do you feel like taking on today?` + } + await ctx.ack({ response_action: 'update', view: { @@ -135,7 +141,7 @@ app.view("chooseopponent", async (ctx) => { "type": "section", "text": { "type": "mrkdwn", - "text": `*Battle Beginner*: Hey there <@${ctx.body.user.id}>! Let's keep things simple, who do you want to battle against?` + "text": messages[rank] || `*Battle Master*: Greetings <@${ctx.body.user.id}>. Please choose an opponent from below to battle.` } }, {