Signed-off-by: Lixfel <git-5w3l@lixfel.de>
Dieser Commit ist enthalten in:
Ursprung
213bc3d319
Commit
d58c461a65
@ -21,9 +21,8 @@ package de.steamwar.velocitycore.discord;
|
||||
|
||||
import de.steamwar.velocitycore.Config;
|
||||
import de.steamwar.velocitycore.VelocityCore;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import net.dv8tion.jda.api.entities.Emoji;
|
||||
import net.dv8tion.jda.api.interactions.components.Button;
|
||||
import net.dv8tion.jda.api.interactions.components.ButtonStyle;
|
||||
@ -41,20 +40,6 @@ public class DiscordConfig {
|
||||
return null;
|
||||
|
||||
return Config.load(DiscordConfig.class, file, description -> description.addPropertyParameters("roles", String.class, DiscordRole.class));
|
||||
/*TypeDescription typeDescription = new TypeDescription(DiscordConfig.class);
|
||||
typeDescription.addPropertyParameters("roles", String.class, DiscordRole.class);
|
||||
|
||||
Constructor constructor = new Constructor(DiscordConfig.class, new LoaderOptions());
|
||||
constructor.addTypeDescription(typeDescription);
|
||||
|
||||
Yaml yaml = new Yaml(constructor);
|
||||
yaml.setBeanAccess(BeanAccess.FIELD);
|
||||
|
||||
try{
|
||||
return yaml.load(new FileInputStream(file));
|
||||
}catch(IOException e){
|
||||
throw new SecurityException("Could not load discord bot configuration", e);
|
||||
}*/
|
||||
}
|
||||
|
||||
public String channel(String type) {
|
||||
@ -71,10 +56,7 @@ public class DiscordConfig {
|
||||
|
||||
private String ticketcategory;
|
||||
|
||||
//public static final Map<UserPerm, String> RANKS = new HashMap<>();
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public static class DiscordRole {
|
||||
|
||||
private String emoji;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren