Public
Versions
- Open: VersionChanges from v15 to v16+1-1⦚ 16 unchanged lines ⦚throw new Error("Error: " + message);}
return val await resp.json();}⦚ 16 unchanged lines ⦚throw new Error("Error: " + message);}return await resp.json();} - Open: VersionChanges from v14 to v15+2-6
async function slackPost (token, channel, text) {const resp = await fetch(`https://slack.com/api/chat.postMessage`,⦚ 13 unchanged lines ⦚throw new Error("Error: " + message);}let val = await resp.json();return val}const token = Deno.env.get("SLACK_TOKEN")const res = await slackPost(token, "C06CQ9TR2CR", "ignore-this")console.log(res)export async function slackPost(token, channel, text) {const resp = await fetch(`https://slack.com/api/chat.postMessage`,⦚ 13 unchanged lines ⦚throw new Error("Error: " + message);}return val await resp.json();} - Open: VersionChanges from v13 to v14+0-0⦚ 25 unchanged lines ⦚⦚ 25 unchanged lines ⦚
- Open: VersionChanges from v12 to v13+2-2⦚ 7 unchanged lines ⦚'Content-type': 'application/json; charset=utf-8',},
body: {channel,text}})if (!resp.ok) {⦚ 10 unchanged lines ⦚⦚ 7 unchanged lines ⦚'Content-type': 'application/json; charset=utf-8',},body: JSON.stringify({channel,text})})if (!resp.ok) {⦚ 10 unchanged lines ⦚ - Open: VersionChanges from v11 to v12+1-1⦚ 21 unchanged lines ⦚const token = Deno.env.get("SLACK_TOKEN")
const res = await slackPost(token, "user-alerts", "ignore-this")console.log(res)⦚ 21 unchanged lines ⦚const token = Deno.env.get("SLACK_TOKEN")const res = await slackPost(token, "C06CQ9TR2CR", "ignore-this")console.log(res) - Open: VersionChanges from v10 to v11+1-1⦚ 5 unchanged lines ⦚headers: {'Authorization': `Bearer ${token}`,
'Content-type: application/json; charset=utf-8',},body: {⦚ 15 unchanged lines ⦚⦚ 5 unchanged lines ⦚headers: {'Authorization': `Bearer ${token}`,'Content-type': 'application/json; charset=utf-8',},body: {⦚ 15 unchanged lines ⦚ - Open: VersionChanges from v9 to v10+1-1⦚ 5 unchanged lines ⦚headers: {'Authorization': `Bearer ${token}`,
'Content-Type': 'utf-8',},body: {⦚ 15 unchanged lines ⦚⦚ 5 unchanged lines ⦚headers: {'Authorization': `Bearer ${token}`,'Content-type: application/json; charset=utf-8',},body: {⦚ 15 unchanged lines ⦚ - Open: VersionChanges from v8 to v9+1-1⦚ 5 unchanged lines ⦚headers: {'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json',},body: {⦚ 15 unchanged lines ⦚⦚ 5 unchanged lines ⦚headers: {'Authorization': `Bearer ${token}`,'Content-Type': 'utf-8',},body: {⦚ 15 unchanged lines ⦚ - Open: Version+25-0async function slackPost (token, channel, text) {const resp = await fetch(`https://slack.com/api/chat.postMessage`,{method: "POST",headers: {'Authorization': `Bearer ${token}`,'Content-Type': 'application/json',},body: {channel,text}})if (!resp.ok) {let { message } = await resp.json();throw new Error("Error: " + message);}let val = await resp.json();return val}const token = Deno.env.get("SLACK_TOKEN")const res = await slackPost(token, "user-alerts", "ignore-this")console.log(res)
Updated: January 3, 2024