1
0
mirror of https://github.com/sciwhiz12/Janitor.git synced 2024-09-16 19:24:02 +00:00

Stop mention in greet command from pinging

This commit is contained in:
sciwhiz12 2020-12-28 04:14:54 +08:00
parent 92bc1bb12e
commit 41fbbe2385
Signed by: sciwhiz12
GPG Key ID: 622CF446534317E1

View File

@ -10,6 +10,7 @@ import sciwhiz12.janitor.api.command.CommandRegistry;
import sciwhiz12.janitor.api.command.arguments.GuildMemberArgument;
import sciwhiz12.janitor.utils.Util;
import java.util.Collections;
import java.util.List;
import static sciwhiz12.janitor.api.Logging.JANITOR;
@ -35,6 +36,7 @@ public class HelloCommand extends BaseCommand {
if (memberList.size() == 1) {
final Member member = memberList.get(0);
ctx.getSource().getChannel().sendMessage("Hello " + member.getAsMention() + "!")
.allowedMentions(Collections.emptyList())
.reference(ctx.getSource().getMessage())
.flatMap(message ->
getBot().getReactions().newMessage(message)