forked from Fascinated/Bat
add scoresaber #1 feed
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
package cc.fascinated.bat.model.guild;
|
||||
package cc.fascinated.bat.model;
|
||||
|
||||
import cc.fascinated.bat.common.Profile;
|
||||
import cc.fascinated.bat.service.DiscordService;
|
@ -1,4 +1,4 @@
|
||||
package cc.fascinated.bat.model.user;
|
||||
package cc.fascinated.bat.model;
|
||||
|
||||
import cc.fascinated.bat.common.Profile;
|
||||
import cc.fascinated.bat.service.DiscordService;
|
@ -1,75 +0,0 @@
|
||||
package cc.fascinated.bat.model.guild.profiles;
|
||||
|
||||
import cc.fascinated.bat.common.Profile;
|
||||
import cc.fascinated.bat.service.DiscordService;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import net.dv8tion.jda.api.entities.channel.concrete.TextChannel;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Fascinated (fascinated7)
|
||||
*/
|
||||
@Getter @Setter
|
||||
public class ScoreSaberUserScoreFeedProfile extends Profile {
|
||||
public ScoreSaberUserScoreFeedProfile() {
|
||||
super("scoresaber-user-score-feed");
|
||||
}
|
||||
|
||||
/**
|
||||
* The channel ID of the score feed
|
||||
*/
|
||||
private String channelId;
|
||||
|
||||
/**
|
||||
* The users that are being tracked
|
||||
*/
|
||||
private List<String> trackedUsers;
|
||||
|
||||
/**
|
||||
* Gets the tracked users
|
||||
*
|
||||
* @return the tracked users
|
||||
*/
|
||||
public List<String> getTrackedUsers() {
|
||||
if (this.trackedUsers == null) {
|
||||
this.trackedUsers = new ArrayList<>();
|
||||
}
|
||||
return this.trackedUsers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a user to be tracked
|
||||
*
|
||||
* @param userId the user ID to add
|
||||
*/
|
||||
public void addTrackedUser(String userId) {
|
||||
if (this.trackedUsers == null) {
|
||||
this.trackedUsers = new ArrayList<>();
|
||||
}
|
||||
trackedUsers.add(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a user from being tracked
|
||||
*
|
||||
* @param userId the user ID to remove
|
||||
*/
|
||||
public void removeTrackedUser(String userId) {
|
||||
if (this.trackedUsers == null) {
|
||||
this.trackedUsers = new ArrayList<>();
|
||||
}
|
||||
trackedUsers.remove(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the channel as a TextChannel
|
||||
*
|
||||
* @return the channel as a TextChannel
|
||||
*/
|
||||
public TextChannel getAsTextChannel() {
|
||||
return DiscordService.JDA.getTextChannelById(channelId);
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
package cc.fascinated.bat.model.user.profiles;
|
||||
|
||||
import cc.fascinated.bat.common.Profile;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author Fascinated (fascinated7)
|
||||
*/
|
||||
@Setter @Getter
|
||||
public class ScoreSaberProfile extends Profile {
|
||||
/**
|
||||
* The Account ID of the ScoreSaber profile
|
||||
*/
|
||||
private String id;
|
||||
|
||||
public ScoreSaberProfile() {
|
||||
super("scoresaber");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user