Skip to content

Latest commit

 

History

271 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dwaz - Discord Wrapper API for Zwafriya

Dwaz 5alina men lmar9a kat3reb tsaybe bot b dwaz?

Overview

Dwaz is a lightweight and modern Discord API wrapper written in Go, designed for developers building Discord bots or integrations. With a focus on simplicity and performance, Dwaz provides an intuitive interface to interact with Discord's API, leveraging Go's concurrency features for efficient bot development. The name "Zwafriya," inspired by Moroccan Arabic.

Installation

To use Dwaz in your Go project, install it via:

go get github.com/marouanesouiri/dwaz

Ensure you have Go 1.22 or later installed, as specified in the project’s go.mod.

Usage

Here’s a basic Ping Pong example to get started with Dwaz:

package main

import (
    "github.com/marouanesouiri/dwaz"
    "context"
    "fmt"
)

func main() {
    // Initialize a new Dwaz client
    client := dwaz.New(
        context.TODO(),
		dwaz.WithToken("YOUR_BOT_TOKEN"),
		dwaz.WithIntents(dwaz.GatewayIntentGuildMessages, dwaz.GatewayIntentMessageContent),
    )

    // Add message create even handlers
    client.OnMessageCreate(func(event dwaz.MessageCreateEvent) {
        if event.Message.Content == "!ping" {
            fmt.Println("Pong!")
        }
    })

    // Start the bot
    client.Start()
}

Replace YOUR_BOT_TOKEN with your Discord bot token. Check the documentation for more examples and API details.

Badges

Go Reference Go Report Go Version License Yada Version Issues Last Commit Lines of Code

Releases

Packages

Used by

Contributors

Languages