can dm user
This commit is contained in:
parent
93c735e25d
commit
41b5c7ea42
1 changed files with 30 additions and 0 deletions
30
commands/owner/dm.js
Normal file
30
commands/owner/dm.js
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
const { Command } = require('discord.js-commando');
|
||||||
|
module.exports = class dmCommand extends Command {
|
||||||
|
constructor(client) {
|
||||||
|
super(client, {
|
||||||
|
name: 'dm',
|
||||||
|
group: 'owner',
|
||||||
|
memberName: 'dm',
|
||||||
|
description: 'Dm the user id',
|
||||||
|
ownerOnly: true,
|
||||||
|
args: [
|
||||||
|
{
|
||||||
|
key: 'id',
|
||||||
|
prompt: 'Wich user would you like to dm?',
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'text',
|
||||||
|
prompt: 'Wich user would you like to dm?',
|
||||||
|
type: 'string',
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async run(message, { id, text }) {
|
||||||
|
const user = this.client.users.get(id);
|
||||||
|
user.send(`**Message from the dev**\n${text}`)
|
||||||
|
message.send('DM sent')
|
||||||
|
}
|
||||||
|
};
|
Loading…
Reference in a new issue