Skip to content

Commit c2f2dcf

Browse files
committed
Update GitHub Webhook messages
1 parent 10a141e commit c2f2dcf

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

.github/workflows/gradle.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ jobs:
2121
bintrayApiKey: ${{ secrets.bintrayApiKey }}
2222
BUILD_NUMBER: 0 # Releases are always major.minor.revision_0
2323
run: ./gradlew bintrayUpload
24-
- name: Publish (GitHub Packages)
25-
env:
26-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27-
BUILD_NUMBER: 0 # Releases are always major.minor.revision_0
28-
run: ./gradlew publish
24+
#- name: Publish (GitHub Packages)
25+
# env:
26+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
# BUILD_NUMBER: 0 # Releases are always major.minor.revision_0
28+
# run: ./gradlew publish
2929
sendMessage:
3030
needs: [publish]
3131
if: success()
3232
runs-on: ubuntu-latest
3333
steps:
3434
- name: Discord notification
35-
uses: rjstone/discord-webhook-notify@v1.0.2
35+
uses: rjstone/discord-webhook-notify@v1
3636
with:
3737
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
3838
severity: info

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins{
77
id 'com.github.johnrengelman.shadow' version '5.2.0'
88
}
99

10-
def ver = new Version(major: 4, minor: 0, revision: 0)
10+
def ver = new Version(major: 4, minor: 0, revision: 1)
1111

1212
group = "org.botblock"
1313
version = "$ver"
@@ -28,7 +28,7 @@ dependencies{
2828
api group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.3.0'
2929
api group: 'org.json', name: 'json', version: '20190722'
3030
api group: 'org.jetbrains', name: 'annotations', version: '18.0.0'
31-
api(group: 'net.dv8tion', name: 'JDA', version: '4.1.0_92'){
31+
api(group: 'net.dv8tion', name: 'JDA', version: '4.1.0_95'){
3232
exclude(module: 'opus-java')
3333
}
3434
api group: 'com.github.ben-manes.caffeine', name: 'caffeine', version: '2.8.0'

src/main/java/org/botblock/javabotblockapi/exceptions/RatelimitedException.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
import org.json.JSONObject;
2121

2222
/**
23-
* Used when the Wrapper gets rate-limited by the BotBlockAPI.
23+
* Indicates that the Java-Wrapper (Bot) was rate-limited by BotBlock.org (Received error code 429)
24+
* <br>The returned error message contains the route, Bot ID, IP and delay for when rate limit is removed.
2425
*/
2526
public class RatelimitedException extends Throwable{
2627
private int delay;
@@ -45,7 +46,7 @@ public RatelimitedException(String response){
4546
@Override
4647
public String getMessage(){
4748
return String.format(
48-
"Got ratelimited on route %s (IP: %s, Bot ID: %s). Can send again in %d seconds.",
49+
"Received Ratelimit. [Route: %s, IP: %s, Bot_id: %s, Delay: %d]",
4950
route,
5051
ip,
5152
bot_id,

0 commit comments

Comments
 (0)