This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To subscribe to an event, pass this JSON text to the client through the WebSocket: | |
{ | |
"body": { | |
"eventName": "NameOfEvent" // Replace with an event name listed below | |
}, | |
"header": { | |
"requestId": "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxx", // UUID | |
"messagePurpose": "subscribe", | |
"version": 1, // Protocol version (currently 1 as-of 1.0.2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Discord all events! | |
// A quick and dirty fleshing out of the discord.js event listeners (not tested at all!) | |
// listed here -> https://discord.js.org/#/docs/main/stable/class/Client | |
// Learn from this, do not just copy it mofo! | |
// | |
// Saved to -> https://gist.github.com/koad/316b265a91d933fd1b62dddfcc3ff584 | |
// Last Updated -> Halloween 2022 | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!window.decodeBackStanza) { | |
window.decodeBackStanza = require("WAWap").decodeStanza; | |
window.encodeBackStanza = require("WAWap").encodeStanza; | |
} | |
require("WAWap").decodeStanza = async (e, t) => { | |
const result = await window.decodeBackStanza(e, t); |