Liam 679143c331
Some checks failed
Deploy to Dokku / docker (ubuntu-latest) (push) Failing after 16s
cleanup profiles
2024-06-25 12:36:40 +01:00

39 lines
908 B
Java

package cc.fascinated.bat.model;
import cc.fascinated.bat.common.Profile;
import cc.fascinated.bat.common.ProfileHolder;
import cc.fascinated.bat.service.DiscordService;
import lombok.Getter;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import net.dv8tion.jda.api.entities.User;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import java.util.HashMap;
import java.util.Map;
/**
* @author Fascinated (fascinated7)
*/
@RequiredArgsConstructor
@Getter @Setter
@Document(collection = "users")
public class BatUser extends ProfileHolder {
/**
* The ID of the user
*/
@NonNull @Id private final String id;
/**
* Gets the guild as the JDA Guild
*
* @return the guild
*/
public User getDiscordUser() {
return DiscordService.JDA.getUserById(id);
}
}