Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove: disgo.OS #366

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading