forked from Galactic/modmail
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",
|
"description": "Modmail bot with eventual integration with Galactic Bot's API",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node index.js",
|
"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": {
|
"devDependencies": {
|
||||||
"eslint": "^7.28.0",
|
"eslint": "^7.28.0",
|
||||||
|
@ -13,7 +13,7 @@ class CannedReply extends Command {
|
|||||||
|
|
||||||
async execute (message, { args }) {
|
async execute (message, { args }) {
|
||||||
|
|
||||||
const [ first ] = args.map((a) => a);
|
const [ first, second ] = args.map((a) => a);
|
||||||
// eslint-disable-next-line prefer-const
|
// eslint-disable-next-line prefer-const
|
||||||
let { channel, content, _caller } = message,
|
let { channel, content, _caller } = message,
|
||||||
anon = false;
|
anon = false;
|
||||||
@ -29,6 +29,7 @@ class CannedReply extends Command {
|
|||||||
|
|
||||||
const list = Object.entries(this.client.modmail.replies);
|
const list = Object.entries(this.client.modmail.replies);
|
||||||
let str = '';
|
let str = '';
|
||||||
|
if (second.toLowerCase() === '-dm') channel = await message.author.createDM();
|
||||||
// eslint-disable-next-line no-shadow
|
// eslint-disable-next-line no-shadow
|
||||||
for (const [ name, content ] of list) {
|
for (const [ name, content ] of list) {
|
||||||
const substr = `**${name}:** ${content}\n`;
|
const substr = `**${name}:** ${content}\n`;
|
||||||
|
Loading…
Reference in New Issue
Block a user