Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
5aa85d45
Commit
5aa85d45
authored
Dec 13, 2019
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#18, Make configuration inline
parent
6cc8a33c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotHelper.kt
...i-core/src/commonMain/kotlin/net.mamoe.mirai/BotHelper.kt
+1
-1
No files found.
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotHelper.kt
View file @
5aa85d45
...
@@ -91,7 +91,7 @@ suspend inline fun Bot.alsoLogin(): Bot = apply { login().requireSuccess() }
...
@@ -91,7 +91,7 @@ suspend inline fun Bot.alsoLogin(): Bot = apply { login().requireSuccess() }
* 使用在默认配置基础上修改的配置进行登录, 返回 [this]
* 使用在默认配置基础上修改的配置进行登录, 返回 [this]
*/
*/
@UseExperimental
(
ExperimentalContracts
::
class
)
@UseExperimental
(
ExperimentalContracts
::
class
)
suspend
inline
fun
Bot
.
alsoLogin
(
noinline
configuration
:
BotConfiguration
.()
->
Unit
):
Bot
{
suspend
inline
fun
Bot
.
alsoLogin
(
configuration
:
BotConfiguration
.()
->
Unit
):
Bot
{
contract
{
contract
{
callsInPlace
(
configuration
,
InvocationKind
.
EXACTLY_ONCE
)
callsInPlace
(
configuration
,
InvocationKind
.
EXACTLY_ONCE
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment