Checking for attachments
This commit is contained in:
parent
3066271c0e
commit
6ef6882335
1 changed files with 6 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
||||||
package buttondevteam.discordplugin;
|
package buttondevteam.discordplugin;
|
||||||
|
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
|
||||||
import buttondevteam.discordplugin.commands.DiscordCommandBase;
|
import buttondevteam.discordplugin.commands.DiscordCommandBase;
|
||||||
|
@ -25,6 +27,10 @@ public class CommandListener {
|
||||||
}, new IListener<MessageReceivedEvent>() {
|
}, new IListener<MessageReceivedEvent>() {
|
||||||
@Override
|
@Override
|
||||||
public void handle(MessageReceivedEvent event) {
|
public void handle(MessageReceivedEvent event) {
|
||||||
|
if (event.getMessage().getChannel().getID().equals("219626707458457603"))
|
||||||
|
Bukkit.getLogger().info("Attachment in dev: " + event.getMessage().getAttachments().stream().map(
|
||||||
|
a -> a.getFilename() + " - " + a.getFilesize() + " - " + a.getId() + " - " + a.getUrl())
|
||||||
|
.collect(Collectors.joining(", ")));
|
||||||
if (!event.getMessage().getChannel().isPrivate())
|
if (!event.getMessage().getChannel().isPrivate())
|
||||||
return;
|
return;
|
||||||
if (event.getMessage().getAuthor().isBot())
|
if (event.getMessage().getAuthor().isBot())
|
||||||
|
|
Loading…
Reference in a new issue