Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shynixn/discordwebhook-ktl
DiscordWebhook-Ktl is a wrapper around the discord webhook bot REST api.
https://github.com/shynixn/discordwebhook-ktl
Last synced: 9 days ago
JSON representation
DiscordWebhook-Ktl is a wrapper around the discord webhook bot REST api.
- Host: GitHub
- URL: https://github.com/shynixn/discordwebhook-ktl
- Owner: Shynixn
- License: mit
- Created: 2019-02-07T17:41:02.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-20T14:29:28.000Z (almost 6 years ago)
- Last Synced: 2024-11-08T16:52:04.292Z (2 months ago)
- Language: Kotlin
- Size: 1.78 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DiscordWebhook-Ktl [![Build Status](https://maven-badges.herokuapp.com/maven-central/com.github.shynixn/discordwebhook-ktl/badge.svg?style=flat-square)](https://maven-badges.herokuapp.com/maven-central/com.github.shynixn/discordwebhook-ktl) [![GitHub license](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://raw.githubusercontent.com/DiscordWebhook-Ktl/master/LICENSE)
| branch | status | coverage | version | download |
| ------------- | ------------- | -------- | --------| ---------|
| master | [![Build Status](https://img.shields.io/travis/Shynixn/DiscordWebhook-Ktl/master.svg?style=flat-square)](https://travis-ci.org/Shynixn/DiscordWebhook-Ktl) | [![Coverage](https://img.shields.io/codecov/c/github/shynixn/discordwebhook-ktl/master.svg?style=flat-square)](https://codecov.io/gh/Shynixn/DiscordWebhook-Ktl/branch/master)|![GitHub license](https://img.shields.io/nexus/r/https/oss.sonatype.org/com.github.shynixn/discordwebhook-ktl.svg?style=flat-square) |[Download latest release](https://github.com/Shynixn/DiscordWebhook-Ktl/releases)|
## DescriptionDiscordWebhook-Ktl is a wrapper around the discord webhook bot REST api.
## Features
* A robustful library for REST client calls to discord webhook bots.
## How to use it
1: Include it from the central maven repository.
```xml
com.github.shynixn
discordwebhook-ktl
1.2```
2: Include the following additional dependencies.
```xml
org.jetbrains.kotlin
kotlin-stdlib-jdk8
1.3.21org.apache.cxf
cxf-rt-rs-client
3.3.0com.fasterxml.jackson.core
jackson-databind
2.9.8```
3: Use a Java sample:
```java
String webHookUrl = "yourDiscordWebHookUrlWhichYouCanDirectlyCopyPasteIntoThis";DiscordWebhookService service = new DiscordWebhookServiceImpl();
DiscordPayload payload = new DiscordPayload();
DiscordEmbed embeddedMessage = new DiscordEmbed("Hello World.", ExtensionKt.getDecimal(Color.RED)
,new DiscordAuthor("Shynixn", null, null), "This should represent a simple sample."
,ExtensionKt.getTimestampIso8601(new Date()), new ArrayList<>());
payload.getEmbeds().add(embeddedMessage);service.sendDiscordPayload(webHookUrl, payload);
```3: Use a Kotlin sample:
```kotlin
val webHookUrl = "yourDiscordWebHookUrlWhichYouCanDirectlyCopyPasteIntoThis";val service = DiscordWebhookServiceImpl()
val payload = DiscordPayload()
val embeddedMessage = DiscordEmbed(
"Hello World.",
Color.RED.decimal,
DiscordAuthor("Shynixn"),
"This should represent a simple sample.",
Date().timestampIso8601
)
payload.embeds.add(embeddedMessage)service.sendDiscordPayload(webHookUrl, payload)
```## Licence
Copyright 2019 Shynixn
The source code is licensed under the MIT license.