mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-06-27 15:49:23 +00:00
Update vendor
This commit is contained in:
12
vendor/github.com/bwmarrin/discordgo/examples/airhorn/main.go
generated
vendored
12
vendor/github.com/bwmarrin/discordgo/examples/airhorn/main.go
generated
vendored
@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
flag.StringVar(&token, "t", "", "Account Token")
|
||||
flag.StringVar(&token, "t", "", "Bot Token")
|
||||
flag.Parse()
|
||||
}
|
||||
|
||||
@ -34,8 +34,8 @@ func main() {
|
||||
return
|
||||
}
|
||||
|
||||
// Create a new Discord session using the provided token.
|
||||
dg, err := discordgo.New(token)
|
||||
// Create a new Discord session using the provided bot token.
|
||||
dg, err := discordgo.New("Bot " + token)
|
||||
if err != nil {
|
||||
fmt.Println("Error creating Discord session: ", err)
|
||||
return
|
||||
@ -102,7 +102,7 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
|
||||
// This function will be called (due to AddHandler above) every time a new
|
||||
// guild is joined.
|
||||
func guildCreate(s *discordgo.Session, event *discordgo.GuildCreate) {
|
||||
if event.Guild.Unavailable != nil {
|
||||
if event.Guild.Unavailable {
|
||||
return
|
||||
}
|
||||
|
||||
@ -131,6 +131,10 @@ func loadSound() error {
|
||||
|
||||
// If this is the end of the file, just return.
|
||||
if err == io.EOF || err == io.ErrUnexpectedEOF {
|
||||
file.Close()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
13
vendor/github.com/bwmarrin/discordgo/examples/new_basic/main.go
generated
vendored
13
vendor/github.com/bwmarrin/discordgo/examples/new_basic/main.go
generated
vendored
@ -10,24 +10,19 @@ import (
|
||||
|
||||
// Variables used for command line parameters
|
||||
var (
|
||||
Email string
|
||||
Password string
|
||||
Token string
|
||||
Token string
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
flag.StringVar(&Email, "e", "", "Account Email")
|
||||
flag.StringVar(&Password, "p", "", "Account Password")
|
||||
flag.StringVar(&Token, "t", "", "Account Token")
|
||||
flag.StringVar(&Token, "t", "", "Bot Token")
|
||||
flag.Parse()
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
// Create a new Discord session using the provided login information.
|
||||
// Use discordgo.New(Token) to just use a token for login.
|
||||
dg, err := discordgo.New(Email, Password, Token)
|
||||
// Create a new Discord session using the provided bot token.
|
||||
dg, err := discordgo.New("Bot " + Token)
|
||||
if err != nil {
|
||||
fmt.Println("error creating Discord session,", err)
|
||||
return
|
||||
|
14
vendor/github.com/bwmarrin/discordgo/examples/pingpong/main.go
generated
vendored
14
vendor/github.com/bwmarrin/discordgo/examples/pingpong/main.go
generated
vendored
@ -9,24 +9,20 @@ import (
|
||||
|
||||
// Variables used for command line parameters
|
||||
var (
|
||||
Email string
|
||||
Password string
|
||||
Token string
|
||||
BotID string
|
||||
Token string
|
||||
BotID string
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
flag.StringVar(&Email, "e", "", "Account Email")
|
||||
flag.StringVar(&Password, "p", "", "Account Password")
|
||||
flag.StringVar(&Token, "t", "", "Account Token")
|
||||
flag.StringVar(&Token, "t", "", "Bot Token")
|
||||
flag.Parse()
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
// Create a new Discord session using the provided login information.
|
||||
dg, err := discordgo.New(Email, Password, Token)
|
||||
// Create a new Discord session using the provided bot token.
|
||||
dg, err := discordgo.New("Bot " + Token)
|
||||
if err != nil {
|
||||
fmt.Println("error creating Discord session,", err)
|
||||
return
|
||||
|
Reference in New Issue
Block a user