1.0.1 • Published 5 years ago
dm-handler v1.0.1
DM-Handler
DM-Handler is an NPM module with which you can get the IDs of the mentions in your commands. DM-Handler is acronym for DiscordMentions-Handler.
Features
- Get the ID of User Mentions
Get the ID of Channel Mentions
Our goal
Our goal is to improve the mentions system in the fastest and easiest way as possible for the Discord.JS developers.
Variables
- Mention: @User or #Channel
- Type: User or Channel
Installation
$ npm install dm-handler --save
Requiring DM-Handler on JS
const dmh = require('dm-handler');
Using DM-Handler on JS
let cmd = messageArray[0];
if(cmd === "getid"){
const mention = args[0];
const type = args[1];
if (!mention) {
message.channel.send("Missing mention!")
}
if(!type) {
message.channel.send("Missing mention type!");
}
const handling = dmh(mention, type);
message.channel.send(handling);
}
Output: Mentioned User's ID
Example Command
getid @Anventec User
Output: Anventec's ID
Creator Social Networks
- Discord: Anventec#7148
Anventec © 2020