mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-26 17:05:01 +00:00
Disable mentions in archival message
This commit is contained in:
parent
011535cf16
commit
80f19f0349
@ -10,6 +10,8 @@ import net.dv8tion.jda.api.entities.TextChannel;
|
|||||||
import net.dv8tion.jda.api.events.message.react.MessageReactionAddEvent;
|
import net.dv8tion.jda.api.events.message.react.MessageReactionAddEvent;
|
||||||
import net.dv8tion.jda.api.hooks.ListenerAdapter;
|
import net.dv8tion.jda.api.hooks.ListenerAdapter;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
public class MessageReactionListener extends ListenerAdapter
|
public class MessageReactionListener extends ListenerAdapter
|
||||||
{
|
{
|
||||||
public void onMessageReactionAdd(MessageReactionAddEvent messageReactionAddEvent)
|
public void onMessageReactionAdd(MessageReactionAddEvent messageReactionAddEvent)
|
||||||
@ -59,6 +61,7 @@ public class MessageReactionListener extends ListenerAdapter
|
|||||||
final MessageEmbed embed = message.getEmbeds().get(0);
|
final MessageEmbed embed = message.getEmbeds().get(0);
|
||||||
final MessageBuilder archiveMessageBuilder = new MessageBuilder();
|
final MessageBuilder archiveMessageBuilder = new MessageBuilder();
|
||||||
archiveMessageBuilder.setContent("Report completed by " + completer.getUser().getAsMention() + " (" + Discord.deformat(completer.getUser().getAsTag() + ")"));
|
archiveMessageBuilder.setContent("Report completed by " + completer.getUser().getAsMention() + " (" + Discord.deformat(completer.getUser().getAsTag() + ")"));
|
||||||
|
archiveMessageBuilder.setAllowedMentions(Collections.emptyList());
|
||||||
archiveMessageBuilder.setEmbed(embed);
|
archiveMessageBuilder.setEmbed(embed);
|
||||||
final Message archiveMessage = archiveMessageBuilder.build();
|
final Message archiveMessage = archiveMessageBuilder.build();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user