Skip to content

Commit

Permalink
chore[onebot11]: use broadcast method instead of forEach
Browse files Browse the repository at this point in the history
  • Loading branch information
RTAkland committed Jan 4, 2025
1 parent c511d6a commit 451a854
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class OneBotAction internal constructor(
override suspend fun send(message: String) {
when (instanceType) {
InstanceType.Client -> botInstance.websocket?.send(message)
InstanceType.Server -> botInstance.websocketServer?.connections?.forEach { it.send(message) }
InstanceType.Server -> botInstance.websocketServer?.broadcast(message)
}
}

Expand Down

0 comments on commit 451a854

Please sign in to comment.