Merge remote-tracking branch 'bwmarrin/develop' into docs
This commit is contained in:
commit
9c23b3bbef
3 changed files with 1 additions and 25 deletions
|
@ -19,7 +19,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// VERSION of Discordgo, follows Symantic Versioning. (http://semver.org/)
|
// VERSION of Discordgo, follows Symantic Versioning. (http://semver.org/)
|
||||||
const VERSION = "0.11.0-alpha"
|
const VERSION = "0.12.0-alpha"
|
||||||
|
|
||||||
// New creates a new Discord session 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
|
// tasks if given enough information to do so. Currently you can pass zero
|
||||||
|
|
22
restapi.go
22
restapi.go
|
@ -587,28 +587,6 @@ func (s *Session) GuildInvites(guildID string) (st []*Invite, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// GuildInviteCreate creates a new invite for the given guild.
|
|
||||||
// guildID : The ID of a Guild.
|
|
||||||
// i : An Invite struct with the values MaxAge, MaxUses, Temporary,
|
|
||||||
// and XkcdPass defined.
|
|
||||||
func (s *Session) GuildInviteCreate(guildID string, i *Invite) (st *Invite, err error) {
|
|
||||||
|
|
||||||
data := struct {
|
|
||||||
MaxAge int `json:"max_age"`
|
|
||||||
MaxUses int `json:"max_uses"`
|
|
||||||
Temporary bool `json:"temporary"`
|
|
||||||
XKCDPass bool `json:"xkcdpass"`
|
|
||||||
}{i.MaxAge, i.MaxUses, i.Temporary, i.XkcdPass}
|
|
||||||
|
|
||||||
body, err := s.Request("POST", GUILD_INVITES(guildID), data)
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
err = unmarshal(body, &st)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// GuildRoles returns all roles for a given guild.
|
// GuildRoles returns all roles for a given guild.
|
||||||
// guildID : The ID of a Guild.
|
// guildID : The ID of a Guild.
|
||||||
func (s *Session) GuildRoles(guildID string) (st []*Role, err error) {
|
func (s *Session) GuildRoles(guildID string) (st []*Role, err error) {
|
||||||
|
|
2
voice.go
2
voice.go
|
@ -136,8 +136,6 @@ func (v *Voice) wsListen(wsConn *websocket.Conn, close <-chan struct{}) {
|
||||||
go v.wsEvent(messageType, message)
|
go v.wsEvent(messageType, message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// wsEvent handles any voice websocket events. This is only called by the
|
// wsEvent handles any voice websocket events. This is only called by the
|
||||||
|
|
Loading…
Reference in a new issue