Add Discord Bot Upload #277
@ -24,12 +24,11 @@ import de.steamwar.bungeecore.sql.SchematicNode;
|
||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||
import net.dv8tion.jda.api.entities.Message;
|
||||
import net.dv8tion.jda.api.events.message.priv.PrivateMessageReceivedEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class PrivateMessageListener extends BasicDiscordListener {
|
||||
|
||||
@Override
|
||||
public void onPrivateMessageReceived(@NotNull PrivateMessageReceivedEvent event) {
|
||||
public void onPrivateMessageReceived(PrivateMessageReceivedEvent event) {
|
||||
if(!event.getMessage().getAttachments().isEmpty()) {
|
||||
SteamwarUser user = SteamwarUser.get(event.getAuthor().getIdLong());
|
||||
if (user == null) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren