cmd.message.id
Returns the ID of a message.
JavaScript
const { cmd } = require("syntx.js");
cmd.message.id(message);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
message | discord.js Message | Yes | The message object from the event. |
Returns
string : The message ID.
Example
JavaScript
client.command({
name: "msgid",
content: (message) => {
const id = cmd.message.id(message);
message.reply(`This message's ID is: ${id}`);
},
});Note
This function is a thin wrapper around message.id. You can access it directly in the same way.