-
Notifications
You must be signed in to change notification settings - Fork 25
Discord Webhook
zvyap edited this page May 11, 2023
·
4 revisions
A short tutorial, you need a basic to create Discord Webhook [Official Article]
- Get the URL of the webhook
- Go to file
./src/test/java/com/zvyap/dailycheckin/test/CheckInDailyTest.java
, clickEdit this file
- Follow the change below
CheckInAction.builder()
.token(HoyoToken.of(System.getenv("USER_1_ID"), System.getenv("USER_1_TOKEN")))
.game(GameType.GENSHIN_IMPACT)
.game(GameType.HONKAI_STAR_RAIL)
.build()
CheckInAction.builder()
.token(HoyoToken.of(System.getenv("USER_1_ID"), System.getenv("USER_1_TOKEN")))
.webhook(WebhookInfo.builder()
.url(System.getenv("WEBHOOK_URL"))
.avatar("https://githubassets.com/images/modules/logos_page/GitHub-Mark.png")
.name("HoyoDaily")
.build())
.game(GameType.GENSHIN_IMPACT)
.game(GameType.HONKAI_STAR_RAIL)
.build()
Avatar
-> Avatar for Discord webhook
Name
-> Name for webhook
URL
-> URL for webhook [only support Discord
]
Do not show your webhook URL here, other can abuse with this URL
For context: Just follow this but add code block below
.webhook(WebhookInfo.builder()
.url(System.getenv("WEBHOOK_URL"))
.avatar("https://githubassets.com/images/modules/logos_page/GitHub-Mark.png")
.name("HoyoDaily")
.build())
FOLLOW THIS
But use secret name WEBHOOK_URL