Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
MehulKhanna committed Mar 7, 2024
1 parent 6707266 commit 2d3c706
Show file tree
Hide file tree
Showing 17 changed files with 42 additions and 201 deletions.
12 changes: 6 additions & 6 deletions discord.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Discordgo - Discord bindings for Go
// Available at https://github.com/bwmarrin/discordgo
// disgoself - Discord bindings for Go
// Available at https://github.com/MehulKhanna/disgoself

// Copyright 2015-2016 Bruce Marriner <bruce@sqls.net>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// This file contains high level helper functions and easy entry points for the
// entire discordgo package. These functions are being developed and are very
// entire disgoself package. These functions are being developed and are very
// experimental at this point. They will most likely change so please use the
// low level functions if that's a problem.

Expand All @@ -21,7 +21,7 @@ import (
"github.com/gorilla/websocket"
)

// VERSION of DiscordGo, follows Semantic Versioning. (http://semver.org/)
// VERSION of disgoself, follows Semantic Versioning. (http://semver.org/)
const VERSION = "0.27.1"

// New creates a new Discord session with provided token.
Expand All @@ -48,7 +48,7 @@ func New(token string) (s *Session, err error) {
MaxRestRetries: 3,
Client: &http.Client{Timeout: (20 * time.Second)},
Dialer: websocket.DefaultDialer,
UserAgent: "DiscordBot (https://github.com/bwmarrin/discordgo, v" + VERSION + ")",
UserAgent: "DiscordBot (https://github.com/MehulKhanna/disgoself, v" + VERSION + ")",
sequence: new(int64),
LastHeartbeatAck: time.Now().UTC(),
}
Expand All @@ -58,7 +58,7 @@ func New(token string) (s *Session, err error) {
s.Identify.Compress = true
s.Identify.LargeThreshold = 250
s.Identify.Properties.OS = runtime.GOOS
s.Identify.Properties.Browser = "DiscordGo v" + VERSION
s.Identify.Properties.Browser = "disgoself v" + VERSION
s.Identify.Intents = IntentsAllWithoutPrivileged
s.Identify.Token = token
s.Token = token
Expand Down
4 changes: 2 additions & 2 deletions discord_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
// ////////////////////////////////////////////////////////////////////////////
// //////////////////////////////////////////////////// VARS NEEDED FOR TESTING
var (
dg *Session // Stores a global discordgo user session
dgBot *Session // Stores a global discordgo bot session
dg *Session // Stores a global disgoself user session
dgBot *Session // Stores a global disgoself bot session

envOAuth2Token = os.Getenv("DG_OAUTH2_TOKEN") // Token to use when authenticating using OAuth2 token
envBotToken = os.Getenv("DGB_TOKEN") // Token to use when authenticating the bot account
Expand Down
81 changes: 0 additions & 81 deletions docs/GettingStarted.md

This file was deleted.

45 changes: 0 additions & 45 deletions docs/img/discordgo.svg

This file was deleted.

33 changes: 0 additions & 33 deletions docs/index.md

This file was deleted.

6 changes: 3 additions & 3 deletions endpoints.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Discordgo - Discord bindings for Go
// Available at https://github.com/bwmarrin/discordgo
// disgoself - Discord bindings for Go
// Available at https://github.com/MehulKhanna/disgoself

// Copyright 2015-2016 Bruce Marriner <bruce@sqls.net>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// This file contains variables for all known Discord end points. All functions
// throughout the Discordgo package use these variables for all connections
// throughout the disgoself package use these variables for all connections
// to Discord. These are all exported and you may modify them if needed.

package disgoself
Expand Down
6 changes: 3 additions & 3 deletions event.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (eh interfaceEventHandler) Handle(s *Session, i interface{}) {

var registeredInterfaceProviders = map[string]EventInterfaceProvider{}

// registerInterfaceProvider registers a provider so that DiscordGo can
// registerInterfaceProvider registers a provider so that disgoself can
// access it's New() method.
func registerInterfaceProvider(eh EventInterfaceProvider) {
if _, ok := registeredInterfaceProviders[eh.Type()]; ok {
Expand Down Expand Up @@ -103,12 +103,12 @@ func (s *Session) addEventHandlerOnce(eventHandler EventHandler) func() {
//
// eg:
//
// Session.AddHandler(func(s *discordgo.Session, m *discordgo.MessageCreate) {
// Session.AddHandler(func(s *disgoself.Session, m *disgoself.MessageCreate) {
// })
//
// or:
//
// Session.AddHandler(func(s *discordgo.Session, m *discordgo.PresenceUpdate) {
// Session.AddHandler(func(s *disgoself.Session, m *disgoself.PresenceUpdate) {
// })
//
// List of events can be found at this page, with corresponding names in the
Expand Down
2 changes: 1 addition & 1 deletion eventhandlers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions logging.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Discordgo - Discord bindings for Go
// Available at https://github.com/bwmarrin/discordgo
// disgoself - Discord bindings for Go
// Available at https://github.com/Mehulkhanna/disgoself

// Copyright 2015-2016 Bruce Marriner <bruce@sqls.net>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// This file contains code related to discordgo package logging
// This file contains code related to disgoself package logging

package disgoself

Expand Down Expand Up @@ -34,10 +34,10 @@ const (
LogDebug
)

// Logger can be used to replace the standard logging for discordgo
// Logger can be used to replace the standard logging for disgoself
var Logger func(msgL, caller int, format string, a ...interface{})

// msglog provides package wide logging consistency for discordgo
// msglog provides package wide logging consistency for disgoself
// the format, a... portion this command follows that of fmt.Printf
//
// msgL : LogLevel of the message
Expand Down
4 changes: 2 additions & 2 deletions message.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Discordgo - Discord bindings for Go
// Available at https://github.com/bwmarrin/discordgo
// disgoself - Discord bindings for Go
// Available at https://github.com/MehulKhanna/disgoself

// Copyright 2015-2016 Bruce Marriner <bruce@sqls.net>. All rights reserved.
// Use of this source code is governed by a BSD-style
Expand Down
4 changes: 2 additions & 2 deletions oauth2.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Discordgo - Discord bindings for Go
// Available at https://github.com/bwmarrin/discordgo
// disgoself - Discord bindings for Go
// Available at https://github.com/MehulKhanna/disgoself

// Copyright 2015-2016 Bruce Marriner <bruce@sqls.net>. All rights reserved.
// Use of this source code is governed by a BSD-style
Expand Down
4 changes: 2 additions & 2 deletions restapi.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Discordgo - Discord bindings for Go
// Available at https://github.com/bwmarrin/discordgo
// disgoself - Discord bindings for Go
// Available at https://github.com/MehulKhanna/disgoself

// Copyright 2015-2016 Bruce Marriner <bruce@sqls.net>. All rights reserved.
// Use of this source code is governed by a BSD-style
Expand Down
8 changes: 4 additions & 4 deletions state.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Discordgo - Discord bindings for Go
// Available at https://github.com/bwmarrin/discordgo
// disgoself - Discord bindings for Go
// Available at https://github.com/MehulKhanna/disgoself

// Copyright 2015-2016 Bruce Marriner <bruce@sqls.net>. All rights reserved.
// Use of this source code is governed by a BSD-style
Expand All @@ -19,7 +19,7 @@ import (
)

// ErrNilState is returned when the state is nil.
var ErrNilState = errors.New("state not instantiated, please use discordgo.New() or assign Session.State")
var ErrNilState = errors.New("state not instantiated, please use disgoself.New() or assign Session.State")

// ErrStateNotFound is returned when the state cache
// requested is not found
Expand Down Expand Up @@ -176,7 +176,7 @@ func (s *State) GuildRemove(guild *Guild) error {
// Guild gets a guild by ID.
// Useful for querying if @me is in a guild:
//
// _, err := discordgo.Session.State.Guild(guildID)
// _, err := disgoself.Session.State.Guild(guildID)
// isInGuild := err == nil
func (s *State) Guild(guildID string) (*Guild, error) {
if s == nil {
Expand Down
6 changes: 3 additions & 3 deletions structs.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Discordgo - Discord bindings for Go
// Available at https://github.com/bwmarrin/discordgo
// disgoself - Discord bindings for Go
// Available at https://github.com/MehulKhanna/disgoself

// Copyright 2015-2016 Bruce Marriner <bruce@sqls.net>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// This file contains all structures for the discordgo package. These
// This file contains all structures for the disgoself package. These
// may be moved about later into separate files but I find it easier to have
// them all located together.

Expand Down
4 changes: 2 additions & 2 deletions structs_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Discordgo - Discord bindings for Go
// Available at https://github.com/bwmarrin/discordgo
// disgoself - Discord bindings for Go
// Available at https://github.com/MehulKhanna/disgoself

// Copyright 2015-2016 Bruce Marriner <bruce@sqls.net>. All rights reserved.
// Use of this source code is governed by a BSD-style
Expand Down
6 changes: 3 additions & 3 deletions voice.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Discordgo - Discord bindings for Go
// Available at https://github.com/bwmarrin/discordgo
// disgoself - Discord bindings for Go
// Available at https://github.com/MehulKhanna/disgoself

// Copyright 2015-2016 Bruce Marriner <bruce@sqls.net>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// This file contains code related to Discord voice suppport
// This file contains code related to Discord voice support

package disgoself

Expand Down

0 comments on commit 2d3c706

Please sign in to comment.