posts "question of the day" to a discord webhook

Updated gitignore and deploy.yaml, started tracking deno.lock, added Google script

+31 -4
+1 -3
.gitignore
··· 1 - .env 2 - .vscode 3 - deno.lock 1 + .env
+3 -1
.tangled/workflows/deploy.yaml
··· 1 + engine: nixery 2 + 1 3 when: 2 4 - event: ["push", "pull_request"] 3 5 branch: ["main"] ··· 17 19 deno install -gArf jsr:@deno/deployctl 18 20 19 21 # 2. Deploy project 20 - deployctl deploy --project=$DENO_DEPLOY_PROJECT --entrypoint=$DENO_DEPLOY_ENTRYPOINT --prod 22 + deployctl deploy --project=$DENO_DEPLOY_PROJECT --entrypoint=$DENO_DEPLOY_ENTRYPOINT --prod
+11
Code.gs
··· 1 + // Google Sheets Apps Script 2 + function doGet() { 3 + const doc = SpreadsheetApp.getActiveSpreadsheet(); 4 + const sheet = doc.getSheetByName("Questions"); 5 + const values = sheet.getRange(2, 1, sheet.getLastRow() - 1, 2).getDisplayValues(); 6 + const result = values.map((item) => ({ 7 + question: item[0], 8 + by: item[1], 9 + })) 10 + return ContentService.createTextOutput(JSON.stringify({data:result})).setMimeType(ContentService.MimeType.JSON); 11 + }
+16
deno.lock
··· 1 + { 2 + "version": "4", 3 + "specifiers": { 4 + "jsr:@std/dotenv@*": "0.225.2" 5 + }, 6 + "jsr": { 7 + "@std/dotenv@0.225.2": { 8 + "integrity": "e2025dce4de6c7bca21dece8baddd4262b09d5187217e231b033e088e0c4dd23" 9 + } 10 + }, 11 + "workspace": { 12 + "dependencies": [ 13 + "jsr:@std/assert@1" 14 + ] 15 + } 16 + }