Skip to content

Commit 64af806

Browse files
committed
Updated to now just have content be for where normal/script/alias info gets put into...
1 parent 97737fe commit 64af806

2 files changed

Lines changed: 5 additions & 31 deletions

File tree

src/main/java/org/mangorage/mangobotplugin/commands/trick/Trick.java

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import jakarta.persistence.Entity;
66
import jakarta.persistence.Id;
77
import jakarta.persistence.Table;
8+
import org.hibernate.annotations.Formula;
89
import org.mangorage.mangobotcore.api.util.data.FileName;
910
import org.mangorage.mangobotcore.api.util.data.IFileNameResolver;
1011

@@ -32,24 +33,13 @@ public final class Trick implements IFileNameResolver {
3233
@Expose
3334
private long timesUsed = 0;
3435

35-
// Cant be used for Script Based Tricks
3636
@Expose
3737
@Column(columnDefinition = "TEXT")
3838
private String content;
3939

4040
@Expose
4141
private boolean suppress = false;
4242

43-
// Used for Script Based Tricks
44-
@Expose
45-
@Column(columnDefinition = "TEXT")
46-
private String script;
47-
48-
// Used for Alias Based Tricks
49-
@Expose
50-
@Column(columnDefinition = "TEXT")
51-
private String aliasTarget;
52-
5343
@Expose
5444
@Column(columnDefinition = "TEXT")
5545
private String trickID;
@@ -72,24 +62,16 @@ public Trick(String trickID, long guildID) {
7262
this.created = System.currentTimeMillis();
7363
}
7464

75-
public void setAliasTarget(String target) {
76-
this.aliasTarget = target;
77-
}
78-
7965
public void setSuppress(boolean suppress) {
8066
this.suppress = suppress;
8167
}
8268

83-
public void setType(TrickType type) {
84-
this.type = type;
85-
}
86-
8769
public void setContent(String content) {
8870
this.content = content;
8971
}
9072

91-
public void setScript(String script) {
92-
this.script = script;
73+
public void setType(TrickType type) {
74+
this.type = type;
9375
}
9476

9577
public void setOwnerID(long ownerID) {
@@ -112,10 +94,6 @@ public TrickType getType() {
11294
return type;
11395
}
11496

115-
public String getAliasTarget() {
116-
return aliasTarget;
117-
}
118-
11997
public long getOwnerID() {
12098
return ownerID;
12199
}
@@ -136,10 +114,6 @@ public String getContent() {
136114
return content;
137115
}
138116

139-
public String getScript() {
140-
return script;
141-
}
142-
143117
public String getTrickID() {
144118
return trickID;
145119
}

src/main/java/org/mangorage/mangobotplugin/commands/trick/impl/TrickAddSubCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ public JDACommandResult run(CommandContext<Message> commandContext) throws Throw
6262
}
6363
case ALIAS -> {
6464
trick.setType(TrickType.ALIAS);
65-
trick.setAliasTarget(trickData);
65+
trick.setContent(trickData);
6666
}
6767
case SCRIPT -> {
6868
trick.setType(TrickType.SCRIPT);
69-
trick.setScript(trickData);
69+
trick.setContent(trickData);
7070
}
7171
}
7272

0 commit comments

Comments
 (0)