Skip to content

Instantly share code, notes, and snippets.

View chimcen's full-sized avatar

chimcen

  • Germany, Mühldorf am Inn
  • 21:57 (UTC +02:00)
View GitHub Profile
@chimcen
chimcen / DiscordWidget.js
Created November 13, 2020 07:38 — forked from heptal/DiscordWidget.js
Recent Discord channel/DM messages shown in iOS14 widget - built with Scriptable.app
// set up keychain and token
const namespace = "dscrd.wdgt"
const token = `${namespace}.usertoken`
if (!Keychain.contains(token) || !Keychain.get(token)) {
let alert = new Alert()
alert.title = "Enter Discord User Token"
alert.addTextField("<discord_token>")
await alert.presentAlert()
Keychain.set(token, alert.textFieldValue(0) || "")
}