arg to send cr list in dms
This commit is contained in:
parent
3c3ea9d90d
commit
fd1c4c9b85
@ -8,7 +8,8 @@
|
||||
"description": "Modmail bot with eventual integration with Galactic Bot's API",
|
||||
"scripts": {
|
||||
"start": "node index.js",
|
||||
"dev": "nodemon --ignore *.json index.js"
|
||||
"dev": "nodemon --ignore *.json index.js",
|
||||
"dockerpub": "tsc && docker build . --tag navydotgif/modmail:latest && docker push navydotgif/modmail:latest "
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^7.28.0",
|
||||
|
@ -13,7 +13,7 @@ class CannedReply extends Command {
|
||||
|
||||
async execute (message, { args }) {
|
||||
|
||||
const [ first ] = args.map((a) => a);
|
||||
const [ first, second ] = args.map((a) => a);
|
||||
// eslint-disable-next-line prefer-const
|
||||
let { channel, content, _caller } = message,
|
||||
anon = false;
|
||||
@ -29,6 +29,7 @@ class CannedReply extends Command {
|
||||
|
||||
const list = Object.entries(this.client.modmail.replies);
|
||||
let str = '';
|
||||
if (second.toLowerCase() === '-dm') channel = await message.author.createDM();
|
||||
// eslint-disable-next-line no-shadow
|
||||
for (const [ name, content ] of list) {
|
||||
const substr = `**${name}:** ${content}\n`;
|
||||
|
Loading…
Reference in New Issue
Block a user