Skip to content

Commit

Permalink
Fixes to suggestions system
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueTree242 committed Feb 4, 2024
1 parent f0c71b7 commit 6d84749
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ public class Suggestion {
protected final Long messageID;
@Getter
protected final DiscordSRVUtils core;
protected Boolean Approved;
protected Boolean approved;
protected Message msg;
@Getter
protected long approver;
protected Long approver;
@Getter
Set<SuggestionVote> votes;

public Suggestion(DiscordSRVUtils core, String text, int number, Long submitter, Long channelID, Long creationTime, Set<SuggestionNote> notes, Long messageID, Boolean Approved, Long approver, Set<SuggestionVote> votes) {
public Suggestion(DiscordSRVUtils core, String text, int number, long submitter, long channelID, long creationTime, Set<SuggestionNote> notes, Long messageID, Boolean approved, Long approver, Set<SuggestionVote> votes) {
this.core = core;
this.text = text;
this.number = number;
Expand All @@ -70,17 +70,16 @@ public Suggestion(DiscordSRVUtils core, String text, int number, Long submitter,
this.creationTime = creationTime;
this.notes = notes;
this.messageID = messageID;
this.Approved = Approved;
this.approved = approved;
this.approver = approver;
this.votes = votes;

}

/**
* @return null if not approved or declined yet, true if approved, false if declined.
**/
public Boolean isApproved() {
return Approved;
return approved;
}


Expand All @@ -105,7 +104,7 @@ public void setApproved(boolean approved, Long staffID) {
.set(SuggestionsTable.SUGGESTIONS.APPROVER, staffID)
.where(SuggestionsTable.SUGGESTIONS.SUGGESTIONNUMBER.eq(number))
.execute();
this.Approved = approved;
this.approved = approved;
this.approver = staffID;
getMessage().editMessage(getCurrentMsg()).setActionRows(core.getSuggestionManager().voteMode == SuggestionVoteMode.BUTTONS ? Collections.singletonList(SuggestionManager.getActionRow(getYesCount(), getNoCount())) : Collections.emptyList()).queue();
}
Expand Down

0 comments on commit 6d84749

Please sign in to comment.