feat: add rank based responses for /chooseopponent

This commit is contained in:
DaInfLoop 2024-06-19 21:27:12 +01:00
parent 7deaf7c31f
commit b91faa3e18

View file

@ -110,6 +110,12 @@ app.view("chooseopponent", async (ctx) => {
const rank = selected_option.value; 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({ await ctx.ack({
response_action: 'update', response_action: 'update',
view: { view: {
@ -135,7 +141,7 @@ app.view("chooseopponent", async (ctx) => {
"type": "section", "type": "section",
"text": { "text": {
"type": "mrkdwn", "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.`
} }
}, },
{ {