Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Deldaflyer/modmailbot int…
Browse files Browse the repository at this point in the history
…o 230912_node_18
  • Loading branch information
Dragory committed Sep 12, 2023
2 parents 18472af + 464dc38 commit 682c25c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/modules/reply.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@ module.exports = ({ bot, knex, config, commands }) => {
aliases: ["ar"]
});

// Replies always with the role and the username. Useful if forceAnon is enabled.
commands.addInboxThreadCommand("realreply", "[text$]", async (msg, args, thread) => {
if (! args.text && msg.attachments.length === 0) {
utils.postError(msg.channel, "Text or attachment required");
return;
}

const replied = await thread.replyToUser(msg.member, args.text || "", msg.attachments, false, msg.messageReference);
if (replied) msg.delete();
}, {
aliases: ["rr"]
});

if (config.allowStaffEdit) {
commands.addInboxThreadCommand("edit", "<messageNumber:number> <text:string$>", async (msg, args, thread) => {
const threadMessage = await thread.findThreadMessageByMessageNumber(args.messageNumber);
Expand Down

0 comments on commit 682c25c

Please sign in to comment.