Skip to content

Commit

Permalink
deprecate: disgo.OS
Browse files Browse the repository at this point in the history
  • Loading branch information
Malix-Labs committed Jun 24, 2024
1 parent 44021d1 commit 6bdd4d0
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions disgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ package disgo
import (
"runtime"
"runtime/debug"
"strings"

"github.com/disgoorg/disgo/bot"
"github.com/disgoorg/disgo/handlers"
Expand All @@ -68,9 +67,6 @@ var (
Version = getVersion()

SemVersion = "semver:" + Version

// OS is the currently used OS
OS = getOS()
)

func getVersion() string {
Expand All @@ -85,17 +81,6 @@ func getVersion() string {
return "unknown"
}

func getOS() string {
os := runtime.GOOS
if strings.HasPrefix(os, "windows") {
return "windows"
}
if strings.HasPrefix(os, "darwin") {
return "darwin"
}
return "linux"
}

// New creates a new bot.Client with the provided token & bot.ConfigOpt(s)
func New(token string, opts ...bot.ConfigOpt) (bot.Client, error) {
config := bot.DefaultConfig(handlers.GetGatewayHandlers(), handlers.GetHTTPServerHandler())
Expand All @@ -105,7 +90,7 @@ func New(token string, opts ...bot.ConfigOpt) (bot.Client, error) {
config,
handlers.DefaultGatewayEventHandlerFunc,
handlers.DefaultHTTPServerEventHandlerFunc,
OS,
runtime.GOOS,
Name,
GitHub,
Version,
Expand Down

0 comments on commit 6bdd4d0

Please sign in to comment.