-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
2 changed files
with
122 additions
and
1 deletion.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/annotations/DoNotChain.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
package com.kotlindiscord.kord.extensions.annotations | ||
|
||
/** Marks a class or function that's part of the bot builder DSLs. **/ | ||
@RequiresOptIn( | ||
message = "This function will cause an immediate REST call. If you want to do more than one operation here, " + | ||
"you should use `.edit { }` instead as that will result in a single REST call for all operations - instead " + | ||
"of a separate REST call for each operation.", | ||
level = RequiresOptIn.Level.WARNING | ||
) | ||
@Target(AnnotationTarget.FUNCTION) | ||
public annotation class DoNotChain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters