geforkt von SteamWar/BungeeCore
Fix DiscordRulesMessage
Fix DiscordSchemAlert Fix DiscordTicketMessage
Dieser Commit ist enthalten in:
Ursprung
1a8e8690ac
Commit
df990e3bc9
@ -21,10 +21,10 @@ package de.steamwar.bungeecore.bot.util;
|
||||
|
||||
import de.steamwar.bungeecore.bot.SteamwarDiscordBot;
|
||||
import de.steamwar.bungeecore.bot.config.SteamwarDiscordBotConfig;
|
||||
import lombok.experimental.UtilityClass;
|
||||
import net.dv8tion.jda.api.EmbedBuilder;
|
||||
import net.dv8tion.jda.api.MessageBuilder;
|
||||
import net.dv8tion.jda.api.entities.Emoji;
|
||||
import net.dv8tion.jda.api.entities.Member;
|
||||
import net.dv8tion.jda.api.entities.Message;
|
||||
import net.dv8tion.jda.api.entities.TextChannel;
|
||||
import net.dv8tion.jda.api.interactions.components.ActionRow;
|
||||
@ -34,9 +34,10 @@ import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@UtilityClass
|
||||
public class DiscordRulesMessage {
|
||||
|
||||
public static void sendMessage() {
|
||||
public void sendMessage() {
|
||||
TextChannel channel = SteamwarDiscordBot.instance().getJda().getGuildById(SteamwarDiscordBotConfig.GUILD).getTextChannelById(SteamwarDiscordBotConfig.RULES_CHANNEL);
|
||||
assert channel != null;
|
||||
Message message = null;
|
||||
|
@ -22,6 +22,7 @@ package de.steamwar.bungeecore.bot.util;
|
||||
import de.steamwar.bungeecore.bot.SteamwarDiscordBot;
|
||||
import de.steamwar.bungeecore.sql.Schematic;
|
||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||
import lombok.experimental.UtilityClass;
|
||||
import net.dv8tion.jda.api.EmbedBuilder;
|
||||
import net.dv8tion.jda.api.MessageBuilder;
|
||||
import net.dv8tion.jda.api.entities.Emoji;
|
||||
@ -32,9 +33,10 @@ import net.dv8tion.jda.api.interactions.components.Button;
|
||||
import java.awt.*;
|
||||
import java.time.Instant;
|
||||
|
||||
@UtilityClass
|
||||
public class DiscordSchemAlert {
|
||||
|
||||
public static void sendDecline(Schematic schematic, SteamwarUser user, String reason) {
|
||||
public void sendDecline(Schematic schematic, SteamwarUser user, String reason) {
|
||||
if(user.getDiscordId() != null) {
|
||||
User dcUser = SteamwarDiscordBot.instance().getJda().retrieveUserById(user.getDiscordId()).complete();
|
||||
EmbedBuilder builder = new EmbedBuilder();
|
||||
@ -54,7 +56,7 @@ public class DiscordSchemAlert {
|
||||
}
|
||||
}
|
||||
|
||||
public static void sendAccept(Schematic schematic, SteamwarUser user) {
|
||||
public void sendAccept(Schematic schematic, SteamwarUser user) {
|
||||
if(user.getDiscordId() != null) {
|
||||
User dcUser = SteamwarDiscordBot.instance().getJda().retrieveUserById(user.getDiscordId()).complete();
|
||||
EmbedBuilder builder = new EmbedBuilder();
|
||||
|
@ -21,6 +21,7 @@ package de.steamwar.bungeecore.bot.util;
|
||||
|
||||
import de.steamwar.bungeecore.bot.SteamwarDiscordBot;
|
||||
import de.steamwar.bungeecore.bot.config.SteamwarDiscordBotConfig;
|
||||
import lombok.experimental.UtilityClass;
|
||||
import net.dv8tion.jda.api.EmbedBuilder;
|
||||
import net.dv8tion.jda.api.MessageBuilder;
|
||||
import net.dv8tion.jda.api.entities.Message;
|
||||
@ -32,9 +33,10 @@ import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@UtilityClass
|
||||
public class DiscordTicketMessage {
|
||||
|
||||
public static void sendMessage() {
|
||||
public void sendMessage() {
|
||||
TextChannel channel = SteamwarDiscordBot.instance().getJda().getGuildById(SteamwarDiscordBotConfig.GUILD).getTextChannelById(SteamwarDiscordBotConfig.TICKET_CHANNEL);
|
||||
assert channel != null;
|
||||
Message message = null;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren