From e52e384fb9d08121d646ec618e04bfc5f3eb8e9b Mon Sep 17 00:00:00 2001 From: "Ean Milligan (Bastion)" Date: Fri, 14 Apr 2023 17:20:57 -0400 Subject: [PATCH] Add option to alternate to denied join request Additionally: Added light telemetry to joinRequest buttons Added loudAcknowledge to editEvent so that the alternate event in DM has a proper response Stopped exporting the execute functions from all live-event buttons, I have no clue why I did that in the first place --- .vscode/settings.json | 1 + db/populateDefaults.ts | 3 ++ src/buttons/_index.ts | 2 + src/buttons/live-event/alternateEvent.ts | 2 +- src/buttons/live-event/alternateRequest.ts | 44 ++++++++++++++++ src/buttons/live-event/joinEvent.ts | 2 +- src/buttons/live-event/joinRequest.ts | 9 +++- src/buttons/live-event/leaveEvent.ts | 2 +- src/buttons/live-event/utils.ts | 58 +++++++++++++++++----- 9 files changed, 106 insertions(+), 17 deletions(-) create mode 100644 src/buttons/live-event/alternateRequest.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 5a4bccf..a3b540f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,6 +13,7 @@ "https://deno.land": true }, "cSpell.words": [ + "sproc", "USTZ" ] } \ No newline at end of file diff --git a/db/populateDefaults.ts b/db/populateDefaults.ts index 6f107b5..4bf0b2c 100644 --- a/db/populateDefaults.ts +++ b/db/populateDefaults.ts @@ -16,6 +16,9 @@ const actions = [ 'btn-joinWLEvent', 'btn-leaveEvent', 'btn-altEvent', + 'btn-joinReqApprove', + 'btn-joinReqDeny', + 'btn-joinReqAlt', ]; for (const action of actions) { await dbClient.execute('INSERT INTO command_cnt(command) values(?)', [action]).catch((e) => { diff --git a/src/buttons/_index.ts b/src/buttons/_index.ts index afd9474..f759784 100644 --- a/src/buttons/_index.ts +++ b/src/buttons/_index.ts @@ -8,6 +8,7 @@ import { joinEventButton } from './live-event/joinEvent.ts'; import { leaveEventButton } from './live-event/leaveEvent.ts'; import { alternateEventButton } from './live-event/alternateEvent.ts'; import { joinRequestButton } from './live-event/joinRequest.ts'; +import { alternateRequestButton } from './live-event/alternateRequest.ts'; export const buttons: Array