diff --git a/discord.go b/discord.go index b36e5cd..9550055 100644 --- a/discord.go +++ b/discord.go @@ -1,7 +1,7 @@ // Discordgo - Discord bindings for Go // Available at https://github.com/bwmarrin/discordgo -// Copyright 2015 Bruce Marriner . All rights reserved. +// Copyright 2015-2016 Bruce Marriner . 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 diff --git a/endpoints.go b/endpoints.go index 5076810..0103f7d 100644 --- a/endpoints.go +++ b/endpoints.go @@ -1,12 +1,12 @@ // Discordgo - Discord bindings for Go // Available at https://github.com/bwmarrin/discordgo -// Copyright 2015 Bruce Marriner . All rights reserved. +// Copyright 2015-2016 Bruce Marriner . 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" } ) diff --git a/restapi.go b/restapi.go index 2ec276d..0672a3a 100644 --- a/restapi.go +++ b/restapi.go @@ -1,7 +1,7 @@ // Discordgo - Discord bindings for Go // Available at https://github.com/bwmarrin/discordgo -// Copyright 2015 Bruce Marriner . All rights reserved. +// Copyright 2015-2016 Bruce Marriner . All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/state.go b/state.go index 6151bbf..991fa28 100644 --- a/state.go +++ b/state.go @@ -1,8 +1,21 @@ +// Discordgo - Discord bindings for Go +// Available at https://github.com/bwmarrin/discordgo + +// Copyright 2015-2016 Bruce Marriner . 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 { diff --git a/structs.go b/structs.go index 4b38fb4..ca6ed5b 100644 --- a/structs.go +++ b/structs.go @@ -1,7 +1,7 @@ // Discordgo - Discord bindings for Go // Available at https://github.com/bwmarrin/discordgo -// Copyright 2015 Bruce Marriner . All rights reserved. +// Copyright 2015-2016 Bruce Marriner . All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/util.go b/util.go index cd98ca3..00ccb9d 100644 --- a/util.go +++ b/util.go @@ -1,7 +1,7 @@ // Discordgo - Discord bindings for Go // Available at https://github.com/bwmarrin/discordgo -// Copyright 2015 Bruce Marriner . All rights reserved. +// Copyright 2015-2016 Bruce Marriner . All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/voice.go b/voice.go index f0c4ab4..574a2a9 100644 --- a/voice.go +++ b/voice.go @@ -1,7 +1,7 @@ // Discordgo - Discord bindings for Go // Available at https://github.com/bwmarrin/discordgo -// Copyright 2015 Bruce Marriner . All rights reserved. +// Copyright 2015-2016 Bruce Marriner . All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/wsapi.go b/wsapi.go index 4137e6e..d582f6b 100644 --- a/wsapi.go +++ b/wsapi.go @@ -1,7 +1,7 @@ // Discordgo - Discord bindings for Go // Available at https://github.com/bwmarrin/discordgo -// Copyright 2015 Bruce Marriner . All rights reserved. +// Copyright 2015-2016 Bruce Marriner . All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file.