forked from Fascinated/Bat
looks too messy with this
This commit is contained in:
parent
1028dca15a
commit
3f93df131d
@ -32,11 +32,10 @@ public class MessageListener implements EventListener {
|
|||||||
public void onGuildMessageDelete(@NonNull BatGuild guild, BatUser user, DiscordMessage message, @NonNull MessageDeleteEvent event) {
|
public void onGuildMessageDelete(@NonNull BatGuild guild, BatUser user, DiscordMessage message, @NonNull MessageDeleteEvent event) {
|
||||||
if (user.getDiscordUser().isBot() || message.getAuthor().isBot()) return;
|
if (user.getDiscordUser().isBot() || message.getAuthor().isBot()) return;
|
||||||
|
|
||||||
TextChannel channel = message.getChannel();
|
|
||||||
logFeature.sendLog(guild, LogType.MESSAGE_DELETE, EmbedUtils.errorEmbed()
|
logFeature.sendLog(guild, LogType.MESSAGE_DELETE, EmbedUtils.errorEmbed()
|
||||||
.setDescription(new EmbedDescriptionBuilder("Message Deleted")
|
.setDescription(new EmbedDescriptionBuilder("Message Deleted")
|
||||||
.appendLine("Author: %s (%s)".formatted(message.getAuthor().getAsMention(), message.getAuthor().getId()), true)
|
.appendLine("Author: %s".formatted(message.getAuthor().getAsMention()), true)
|
||||||
.appendLine("Channel: %s (%s)".formatted(channel.getAsMention(), channel.getName()), true)
|
.appendLine("Channel: %s".formatted(message.getChannel().getAsMention()), true)
|
||||||
.appendLine("Content: %s".formatted(logFeature.formatContent(message.getContent())), true)
|
.appendLine("Content: %s".formatted(logFeature.formatContent(message.getContent())), true)
|
||||||
.build())
|
.build())
|
||||||
.build());
|
.build());
|
||||||
@ -47,11 +46,10 @@ public class MessageListener implements EventListener {
|
|||||||
@NonNull DiscordMessage newMessage, @NonNull MessageUpdateEvent event) {
|
@NonNull DiscordMessage newMessage, @NonNull MessageUpdateEvent event) {
|
||||||
if (user.getDiscordUser().isBot() || newMessage.getAuthor().isBot() || oldMessage == null) return;
|
if (user.getDiscordUser().isBot() || newMessage.getAuthor().isBot() || oldMessage == null) return;
|
||||||
|
|
||||||
TextChannel channel = newMessage.getChannel();
|
|
||||||
logFeature.sendLog(guild, LogType.MESSAGE_EDIT, EmbedUtils.genericEmbed()
|
logFeature.sendLog(guild, LogType.MESSAGE_EDIT, EmbedUtils.genericEmbed()
|
||||||
.setDescription(new EmbedDescriptionBuilder("Message Edited")
|
.setDescription(new EmbedDescriptionBuilder("Message Edited")
|
||||||
.appendLine("Author: %s (%s)".formatted(newMessage.getAuthor().getAsMention(), newMessage.getAuthor().getId()), true)
|
.appendLine("Author: %s".formatted(newMessage.getAuthor().getAsMention()), true)
|
||||||
.appendLine("Channel: %s (%s)".formatted(channel.getAsMention(), channel.getName()), true)
|
.appendLine("Channel: %s".formatted(newMessage.getChannel().getAsMention()), true)
|
||||||
.appendLine("Old Content: %s".formatted(logFeature.formatContent(oldMessage.getContent())), true)
|
.appendLine("Old Content: %s".formatted(logFeature.formatContent(oldMessage.getContent())), true)
|
||||||
.appendLine("New Content: %s".formatted(logFeature.formatContent(newMessage.getContent())), true)
|
.appendLine("New Content: %s".formatted(logFeature.formatContent(newMessage.getContent())), true)
|
||||||
.build())
|
.build())
|
||||||
|
Loading…
Reference in New Issue
Block a user