Browse Source

Updated copyright year, cleaned up some comments.

Bruce Marriner 9 years ago
parent
commit
301fb980d3
8 changed files with 26 additions and 48 deletions
  1. 4 39
      discord.go
  2. 3 3
      endpoints.go
  3. 1 1
      restapi.go
  4. 14 1
      state.go
  5. 1 1
      structs.go
  6. 1 1
      util.go
  7. 1 1
      voice.go
  8. 1 1
      wsapi.go

+ 4 - 39
discord.go

@@ -1,7 +1,7 @@
 // Discordgo - Discord bindings for Go
 // Available at https://github.com/bwmarrin/discordgo
 
-// Copyright 2015 Bruce Marriner <bruce@sqls.net>.  All rights reserved.
+// 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.
 
@@ -15,45 +15,10 @@ package discordgo
 
 import "fmt"
 
-// DiscordGo Version, follows Symantic Versioning. (http://semver.org/)
+// Discordgo Version, follows Symantic Versioning. (http://semver.org/)
 const VERSION = "0.9.0-alpha"
 
-/*
-type Config struct {
-	Debug bool
-}
-*/
-/*
-// possible future main struct for discord connection
-type Discord struct {
-	Debug    bool      // Set to true to enable debug logging
-	Token    string    // authentication token
-	User     User      // authenticated user info
-	Guilds   []Guild   // Cached Guild info
-	Channels []Channel // Cached Channel info
-	API      api       // all api endpoint functions
-	DataWS   dataWS    // data websocket connection
-	VoiceWS  voiceWS   // voice websocket/udp connections
-	VoiceUDP voiceUDP
-}
-
-type api struct {
-	Session
-}
-type dataWS struct {
-}
-
-type voiceWS struct {
-}
-
-type voiceUDP struct {
-}
-*/
-// NOTICE: This function should be considered unstable because I am still
-// exploring the best way to implement my goals here.  So, it is more likely
-// to change than than the low level API functions.
-//
-// New creates a new Discord session interface and will automate some startup
+// New creates a new Discord session and will automate some startup
 // tasks if given enough information to do so.  Currently you can pass zero
 // arguments and it will return an empty Discord session. If you pass a token
 // or username and password (in that order), then it will attempt to login to
@@ -72,7 +37,7 @@ func New(args ...interface{}) (s *Session, err error) {
 		return
 	}
 
-	// Varibles used below when parsing func arguments
+	// Variables used below when parsing func arguments
 	var auth, pass string
 
 	// Parse passed arguments

+ 3 - 3
endpoints.go

@@ -1,12 +1,12 @@
 // Discordgo - Discord bindings for Go
 // Available at https://github.com/bwmarrin/discordgo
 
-// Copyright 2015 Bruce Marriner <bruce@sqls.net>.  All rights reserved.
+// 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 Discordgo package use these variables for all connections
 // to Discord.  These are all exported and you may modify them if needed.
 
 package discordgo
@@ -79,6 +79,6 @@ var (
 	INVITE = func(iID string) string { return API + "invite/" + iID }
 
 	INTEGRATIONS_JOIN = func(iID string) string { return API + "integrations/" + iID + "/join" }
-	
+
 	EMOJI = func(eID string) string { return API + "emojis/" + eID + ".png" }
 )

+ 1 - 1
restapi.go

@@ -1,7 +1,7 @@
 // Discordgo - Discord bindings for Go
 // Available at https://github.com/bwmarrin/discordgo
 
-// Copyright 2015 Bruce Marriner <bruce@sqls.net>.  All rights reserved.
+// 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.
 

+ 14 - 1
state.go

@@ -1,8 +1,21 @@
+// Discordgo - Discord bindings for Go
+// Available at https://github.com/bwmarrin/discordgo
+
+// 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 state tracking.  If enabled, state
+// tracking will capture the initial READY packet and many other websocket
+// events and maintain an in-memory state of of guilds, channels, users, and
+// so forth.  This information can be accessed through the Session.State struct.
+// This code was contributed by https://github.com/iopred
+
 package discordgo
 
 import "errors"
 
-var nilError error = errors.New("State not instantiated, please use discordgo.New() or assign session.State.")
+var nilError error = errors.New("State not instantiated, please use discordgo.New() or assign Session.State.")
 
 // NewState creates an empty state.
 func NewState() *State {

+ 1 - 1
structs.go

@@ -1,7 +1,7 @@
 // Discordgo - Discord bindings for Go
 // Available at https://github.com/bwmarrin/discordgo
 
-// Copyright 2015 Bruce Marriner <bruce@sqls.net>.  All rights reserved.
+// 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.
 

+ 1 - 1
util.go

@@ -1,7 +1,7 @@
 // Discordgo - Discord bindings for Go
 // Available at https://github.com/bwmarrin/discordgo
 
-// Copyright 2015 Bruce Marriner <bruce@sqls.net>.  All rights reserved.
+// 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.
 

+ 1 - 1
voice.go

@@ -1,7 +1,7 @@
 // Discordgo - Discord bindings for Go
 // Available at https://github.com/bwmarrin/discordgo
 
-// Copyright 2015 Bruce Marriner <bruce@sqls.net>.  All rights reserved.
+// 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.
 

+ 1 - 1
wsapi.go

@@ -1,7 +1,7 @@
 // Discordgo - Discord bindings for Go
 // Available at https://github.com/bwmarrin/discordgo
 
-// Copyright 2015 Bruce Marriner <bruce@sqls.net>.  All rights reserved.
+// 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.