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
// CommonJS | |
exports.getFlagValues = function (queryCommand = "") { | |
let FlagValuesObject = {}; | |
const stringParts = queryCommand | |
.split(" ") | |
.map((part) => part.replace(/["']/g, "")); | |
let valueCompleted = true; | |
let accummulator_key = ""; | |
let accummulator_value = []; |
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
// You can create a new file like this | |
class Session { | |
// this is just to make sure you are isolating data that pertains to multiple groups | |
constructor() { | |
this.sessions = {}; | |
} | |
getSession(sessionId) { | |
const _session = this.sessions[sessionId]; | |
console.log("Getting",sessionId, _session) |
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
// msg.hasMedo | |
if (msg.hasMedia) { | |
// impor at the top of file | |
// import Tesseract from 'tesseract.js'; | |
// pic | |
const messageMedia = await msg.downloadMedia() | |
// check if media is png or jpeg | |
if (messageMedia.mimetype === "image/jpeg" || messageMedia.mimetype === "image/png") { |