aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/bwmarrin/discordgo/state.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/bwmarrin/discordgo/state.go')
-rw-r--r--vendor/github.com/bwmarrin/discordgo/state.go20
1 files changed, 5 insertions, 15 deletions
diff --git a/vendor/github.com/bwmarrin/discordgo/state.go b/vendor/github.com/bwmarrin/discordgo/state.go
index e75be89..6404b71 100644
--- a/vendor/github.com/bwmarrin/discordgo/state.go
+++ b/vendor/github.com/bwmarrin/discordgo/state.go
@@ -7,7 +7,7 @@
// 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
+// events and maintain an in-memory state of guilds, channels, users, and
// so forth. This information can be accessed through the Session.State struct.
package discordgo
@@ -661,18 +661,6 @@ func (s *State) ThreadMemberUpdate(mu *ThreadMemberUpdate) error {
return nil
}
-// GuildChannel gets a channel by ID from a guild.
-// This method is Deprecated, use Channel(channelID)
-func (s *State) GuildChannel(guildID, channelID string) (*Channel, error) {
- return s.Channel(channelID)
-}
-
-// PrivateChannel gets a private channel by ID.
-// This method is Deprecated, use Channel(channelID)
-func (s *State) PrivateChannel(channelID string) (*Channel, error) {
- return s.Channel(channelID)
-}
-
// Channel gets a channel by ID, it will look in all guilds and private channels.
func (s *State) Channel(channelID string) (*Channel, error) {
if s == nil {
@@ -979,8 +967,9 @@ func (s *State) OnInterface(se *Session, i interface{}) (err error) {
err = s.GuildRemove(t.Guild)
case *GuildMemberAdd:
+ var guild *Guild
// Updates the MemberCount of the guild.
- guild, err := s.Guild(t.Member.GuildID)
+ guild, err = s.Guild(t.Member.GuildID)
if err != nil {
return err
}
@@ -995,8 +984,9 @@ func (s *State) OnInterface(se *Session, i interface{}) (err error) {
err = s.MemberAdd(t.Member)
}
case *GuildMemberRemove:
+ var guild *Guild
// Updates the MemberCount of the guild.
- guild, err := s.Guild(t.Member.GuildID)
+ guild, err = s.Guild(t.Member.GuildID)
if err != nil {
return err
}