Add role name into replies
parent
86dd4b59c5
commit
4a1cb8dd07
6
index.js
6
index.js
|
@ -319,8 +319,12 @@ bot.registerCommand('reply', (msg, args) => {
|
|||
|
||||
saveAttachments(msg).then(() => {
|
||||
bot.getDMChannel(channelInfo.userId).then(dmChannel => {
|
||||
const roleId = msg.member.roles[0];
|
||||
const role = (roleId ? modMailGuild.roles.get(roleId).name : '');
|
||||
const roleStr = (role ? `(${role}) ` : '');
|
||||
|
||||
let argMsg = args.join(' ').trim();
|
||||
let content = `**${msg.author.username}:** ${argMsg}`;
|
||||
let content = `**${roleStr}${msg.author.username}:** ${argMsg}`;
|
||||
|
||||
const sendMessage = (file, attachmentUrl) => {
|
||||
dmChannel.createMessage(content, file).then(() => {
|
||||
|
|
Loading…
Reference in New Issue