An overview of all events in Discord.js v14 with examples.
📢 | Last updated: 27 July 2022
ℹ️ | client
references to your client instance.
ℹ️ | The v13 overview can be found here.
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. |
An overview of all events in Discord.js v14 with examples.
📢 | Last updated: 27 July 2022
ℹ️ | client
references to your client instance.
ℹ️ | The v13 overview can be found here.
Discord timestamps can be useful for specifying a date/time across multiple users time zones. They work with the Unix Timestamp format and can be posted by regular users as well as bots and applications.
The Epoch Unix Time Stamp Converter is a good way to quickly generate a timestamp. For the examples below I will be using the Time Stamp of 1543392060
, which represents November 28th, 2018
at 09:01:00
hours for my local time zone (GMT+0100 Central European Standard Time).
Style | Input | Output (12-hour clock) | Output (24-hour clock) |
---|---|---|---|
Default | <t:1543392060> |
November 28, 2018 9:01 AM | 28 November 2018 09:01 |