Skip to content

Commit

Permalink
contact toString
Browse files Browse the repository at this point in the history
  • Loading branch information
MrXiaoM committed Jan 6, 2024
1 parent ca837df commit a6e9521
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ class BotWrapper private constructor(
return impl.customRequest({ actionPath }, params).toString()
}

override fun toString(): String = "Bot($id)"

companion object {
suspend fun wrap(impl: Bot, botConfiguration: BotConfiguration? = null): BotWrapper {
val loginInfo = impl.getLoginInfo().data // also refresh bot id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,6 @@ class FriendWrapper(
): ShortVideo {
return OnebotMessages.videoFromFile(FileService.instance!!.upload(video))
}

override fun toString(): String = "Friend($id)"
}
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ class GroupWrapper(
return OnebotMessages.videoFromFile(FileService.instance!!.upload(video))
}

override fun toString(): String = "Group($id)"

@Suppress("DEPRECATION_ERROR")
@Deprecated(
"Please use files instead.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,6 @@ class MemberWrapper(
): ShortVideo {
return OnebotMessages.videoFromFile(FileService.instance!!.upload(video))
}

override fun toString(): String = "NormalMember($id)"
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,6 @@ class StrangerWrapper(
): ShortVideo {
return OnebotMessages.videoFromFile(FileService.instance!!.upload(video))
}

override fun toString(): String = "Stranger($id)"
}

0 comments on commit a6e9521

Please sign in to comment.