Skip to content

BinaryWriter/discord-webhooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

discord-webhooks - Kotlin library for sending discord webhooks

Repo Size Issues Pull Requests Jitpack.IO Repo


Download

  • Gradle

    repositories {
        //...
        maven { url = 'https://jitpack.io' }
    }
    
    dependencies {
        //...
        implementation 'com.github.BinaryWriter:discord-webhooks:1.0'
    }
  • Maven

    <project>
        <repositories>
            <!-- ... -->
            <repository>
                <id>jitpack-repo</id>
                <url>https://jitpack.io</url>
            </repository>
        </repositories>
    
        <dependencies>
            <!-- ... -->
            <dependency>
                <groupId>com.github.BinaryWriter</groupId>
                <artifactId>discord-webhooks</artifactId>
                <version>1.0</version>
            </dependency>
        </dependencies>
    </project>

Samples

  • Sending webhook

import me.binarywriter.discordwebhooks.data.*

fun main() {
    val webhook = Webhook {
        this.username = "Username"
        this.content = "Content"
        embed {
            this.title = "Embed Title"
            this.description = "Embed Description"

            author {
                this.name = "Author Name"
            }

            field {
                this.name = "Field Name"
                this.value = "Field Value"
            }

            // ...
        }

        // ...
    }

    webhook.send("URL HERE")
}
Result

Image

About

Kotlin library for sending discord webhooks

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages