Galarzaa
Galarzaa
Explore posts from servers
KEKord Extensions
Created by Galarzaa on 8/8/2024 in #kordex-support
Production instance's caching behaving very differently
No description
16 replies
KEKord Extensions
Created by Galarzaa on 6/28/2024 in #kordex-support
ConcurrentModificationException errors
So today I finally released by bot to production, which was scary because it meant going from 3 servers to 16k servers... so of course I expected errors. This error is popping up on various places on my bot when accessing stuff from Discord. I'm using: defaultStrategy = EntitySupplyStrategy.cacheWithCachingRestFallback. This is happening in various functions that interact with Discord data in some way, in the particular stacktrace I attached, it refers to this call:
private suspend fun EventContext<MemberLeaveEvent>.onMemberLeft() {
val world = nabBot.serverWorldMapping[event.guild.longId]
val botMember = event.guild.selfMember() // <-- this line
webhookManager.sendLogMessage(event.guild) {
// More code
}
}
private suspend fun EventContext<MemberLeaveEvent>.onMemberLeft() {
val world = nabBot.serverWorldMapping[event.guild.longId]
val botMember = event.guild.selfMember() // <-- this line
webhookManager.sendLogMessage(event.guild) {
// More code
}
}
event { action { onMemberLeft() } }
event { action { onMemberLeft() } }
This is happening in many different places, with stuff that interacts with the entity supplier or with Flows.
68 replies
KEKord Extensions
Created by Galarzaa on 2/25/2024 in #kordex-support
Sentry DSN not detected
No description
11 replies
KEKord Extensions
Created by Galarzaa on 2/24/2024 in #kordex-support
Setting sentry's context
So I recently upgraded to the latest snapshot, and I'm trying to migrate this:
sentry?.captureException(e) {
setContexts(
"character", mapOf(
"name" to character.name,
"level" to character.level,
"userId" to character.userId,
"world" to character.world
)
)
setContexts(
"guild", mapOf(
"name" to guild.name, "id" to guild.longId
)
)
}
sentry?.captureException(e) {
setContexts(
"character", mapOf(
"name" to character.name,
"level" to character.level,
"userId" to character.userId,
"world" to character.world
)
)
setContexts(
"guild", mapOf(
"name" to guild.name, "id" to guild.longId
)
)
}
First thing I tried was to replace captureException with captureThrowable. This sentry instance is coming from EventContext in a custom KordEx event.
77 replies