arg to send cr list in dms

This commit is contained in:
Erik 2023-08-13 20:34:04 +03:00
parent 3c3ea9d90d
commit fd1c4c9b85
Signed by untrusted user: Navy.gif
GPG Key ID: 2532FBBB61C65A68
2 changed files with 114 additions and 112 deletions

View File

@ -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",

View File

@ -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`;