Skip to content

Instantly share code, notes, and snippets.

View chimcen's full-sized avatar


  • Germany, Mühldorf am Inn
View GitHub Profile
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
View DiscordWidget.js
// 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"
await alert.presentAlert()
Keychain.set(token, alert.textFieldValue(0) || "")