Skip to content

Commit

Permalink
⚡ My bad, forgot a class for the structure system
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsTheSky committed Jan 3, 2025
1 parent 700b535 commit 527888e
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package info.itsthesky.disky.api.datastruct.structures;

import info.itsthesky.disky.api.datastruct.DataStructure;
import info.itsthesky.disky.api.datastruct.DataStructureEntry;
import info.itsthesky.disky.api.datastruct.base.DataStruct;
import net.dv8tion.jda.api.entities.MessageEmbed;

@DataStructure(value = "embed field", clazz = MessageEmbed.Field.class, canBeCreated = false)
public class EmbedFieldStructure implements DataStruct<MessageEmbed.Field> {

@DataStructureEntry(value = "name")
public String name;

@DataStructureEntry(value = "value")
public String value;

@DataStructureEntry(value = "inline", optional = true)
public boolean inline = false;

@Override
public MessageEmbed.Field build() {
return new MessageEmbed.Field(name, value, inline);
}
}

0 comments on commit 527888e

Please sign in to comment.