Skip to content

Commit

Permalink
Only save Loritta's self member instance on the local session cache i…
Browse files Browse the repository at this point in the history
…nstead of saving all members
  • Loading branch information
MrPowerGamerBR committed Mar 14, 2024
1 parent 747e19a commit 4c45034
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ object DeviousConverter {
// Unused by JDA: large
this.put("member_count", guild.memberCount)
this.putJsonArray("members") {
for (member in guild.members) {
// Instead of storing all guild members, we will only store Loritta's self instance
// This way we avoid taking soooo damn long to save guild data, since we actually don't *need* to restore member data
val membersToBeSaved = listOf(guild.selfMember)

for (member in membersToBeSaved) {
addJsonObject {
putJsonObject("user") {
val user = member.user
Expand Down

0 comments on commit 4c45034

Please sign in to comment.