https://github.com/implex-ltd/ucdiscord
Undetected Discord api wrapper made by human, for bots.
https://github.com/implex-ltd/ucdiscord
Last synced: 10 months ago
JSON representation
Undetected Discord api wrapper made by human, for bots.
- Host: GitHub
- URL: https://github.com/implex-ltd/ucdiscord
- Owner: Implex-ltd
- License: apache-2.0
- Created: 2023-08-19T04:53:22.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-25T12:52:30.000Z (over 2 years ago)
- Last Synced: 2024-04-30T07:15:38.563Z (about 2 years ago)
- Language: Go
- Homepage:
- Size: 192 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Undetected Discord wrapper
Undetected Discord api wrapper made by human, for bots.
## Install
```
go get -u github.com/Implex-ltd/ucdiscord/ucdiscord
```
## Issues
```
$env:GOPRIVATE="github.com/Implex-ltd/"
$env:GOSUMDB="off"
set GOPRIVATE=github.com/Implex-ltd/ucdiscord/ucdiscord
go get -u github.com/Implex-ltd/ucdiscord/ucdiscord@version
```
## Quick start
```go
package main
import (
"log"
"github.com/Implex-ltd/cleanhttp/cleanhttp"
"github.com/Implex-ltd/fingerprint-client/fpclient"
u "github.com/Implex-ltd/ucdiscord/ucdiscord"
)
func main() {
// Load fingerprint
fp, err := fpclient.LoadFingerprint(&fpclient.LoadingConfig{
FilePath: "./chrome.json",
})
if err != nil {
panic(err)
}
// Load HTTP client
http, err := cleanhttp.NewCleanHttpClient(&cleanhttp.Config{
BrowserFp: fp,
Proxy: "http://0.0.0.0:8080",
})
if err != nil {
return
}
// Create discord session
client, err := u.NewClient(&u.ClientConfig{
Token: "FOOBAR123",
GetCookies: true,
BuildNumber: 00000,
Client: http,
})
if err != nil {
panic(err)
}
// Join a server
resp, err := client.JoinGuild(&u.JoinConfig{
InviteCode: "supercode",
GuildID: "00000000000000",
ChannelID: "00000000000000",
})
if err != nil {
panic(err)
}
log.Printf("Joined %s (%s)\n", resp.Guild.Name, resp.Guild.ID)
}
```