Instantly share code, notes, and snippets.
SENPAY98K /CompleteDiscordQuest.md
CreatedNovember 8, 2025 11:22 — forked fromaamiaa/CompleteDiscordQuest.md
Complete Recent Discord QuestSENPAY98K /Connecting Multiple Database in NodeJs with MongoDB and Mongoose
CreatedMarch 30, 2024 17:28 — forked fromhackinf0/Connecting Multiple Database in NodeJs with MongoDB and Mongoose
Connecting Multiple Database in NodeJs with MongoDB and Mongoose This file contains hidden or 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
| Explanation file: db.js | |
| This code imports the mongoose library which allows to connect to a MongoDB database. | |
| There are two URIs defined to connect to two different databases: MONGO_URI and MOBILE_URI. | |
| Each URI contains connection information to a remote MongoDB database, including user credentials. | |
| The connectDBs function uses the mongoose.createConnection method to create connections to these two | |
| databases using the respective URIs. The useUnifiedTopology and useNewUrlParser options are set to enable the new | |
| unified topology policy and use MongoDB's new URL parser, respectively. | |
| The function returns an object that contains the connections to these two databases as qrCodeDb and userDB properties. |
SENPAY98K /discordjs-cheatsheet.js
CreatedMarch 19, 2023 19:28 — forked fromkoad/discordjs-cheatsheet.js
This file contains hidden or 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 | |
| /* |