Skip to content

Commit 6ea6fc5

Browse files
author
caneleex
committed
Merge remote-tracking branch 'origin/development' into development
2 parents 84286e0 + 88af671 commit 6ea6fc5

File tree

28 files changed

+314
-891
lines changed

28 files changed

+314
-891
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func main() {
9999
panic(err)
100100
}
101101
// connect to the gateway
102-
if err = client.ConnectGateway(context.TODO()); err != nil {
102+
if err = client.OpenGateway(context.TODO()); err != nil {
103103
panic(err)
104104
}
105105

_examples/application_commands/gateway/example.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"github.com/disgoorg/disgo/bot"
1111
"github.com/disgoorg/disgo/discord"
1212
"github.com/disgoorg/disgo/events"
13-
"github.com/disgoorg/disgo/gateway"
1413
"github.com/disgoorg/log"
1514
"github.com/disgoorg/snowflake/v2"
1615
)
@@ -45,7 +44,7 @@ func main() {
4544
log.Info("disgo version: ", disgo.Version)
4645

4746
client, err := disgo.New(token,
48-
bot.WithGatewayConfigOpts(gateway.WithIntents(gateway.IntentsNone)),
47+
bot.WithDefaultGateway(),
4948
bot.WithEventListenerFunc(commandListener),
5049
)
5150
if err != nil {
@@ -59,7 +58,7 @@ func main() {
5958
log.Fatal("error while registering commands: ", err)
6059
}
6160

62-
if err = client.ConnectGateway(context.TODO()); err != nil {
61+
if err = client.OpenGateway(context.TODO()); err != nil {
6362
log.Fatal("error while connecting to gateway: ", err)
6463
}
6564

_examples/application_commands/http/example.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func main() {
6969
log.Fatal("error while registering commands: ", err)
7070
}
7171

72-
if err = client.StartHTTPServer(); err != nil {
72+
if err = client.OpenHTTPServer(); err != nil {
7373
log.Fatal("error while starting http server: ", err)
7474
}
7575

_examples/application_commands/localization/example.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"github.com/disgoorg/disgo/bot"
1111
"github.com/disgoorg/disgo/discord"
1212
"github.com/disgoorg/disgo/events"
13-
"github.com/disgoorg/disgo/gateway"
1413
"github.com/disgoorg/log"
1514
"github.com/disgoorg/snowflake/v2"
1615
)
@@ -69,7 +68,7 @@ func main() {
6968
log.Infof("disgo version: %s", disgo.Version)
7069

7170
client, err := disgo.New(token,
72-
bot.WithGatewayConfigOpts(gateway.WithIntents(gateway.IntentsNone)),
71+
bot.WithDefaultGateway(),
7372
bot.WithEventListenerFunc(commandListener),
7473
)
7574
if err != nil {
@@ -83,7 +82,7 @@ func main() {
8382
log.Fatal("error while registering commands: ", err)
8483
}
8584

86-
if err = client.ConnectGateway(context.TODO()); err != nil {
85+
if err = client.OpenGateway(context.TODO()); err != nil {
8786
log.Fatal("error while connecting to gateway: ", err)
8887
}
8988

_examples/auto_moderation/example.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func main() {
5353

5454
defer client.Close(context.TODO())
5555

56-
if err = client.ConnectGateway(context.TODO()); err != nil {
56+
if err = client.OpenGateway(context.TODO()); err != nil {
5757
log.Fatal("error while connecting to gateway: ", err)
5858
}
5959

_examples/components/example.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func main() {
5050

5151
defer client.Close(context.TODO())
5252

53-
if err = client.ConnectGateway(context.TODO()); err != nil {
53+
if err = client.OpenGateway(context.TODO()); err != nil {
5454
log.Fatal("error while connecting to gateway: ", err)
5555
}
5656

_examples/guild_scheduled_events/example.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func main() {
8484
return
8585
}
8686

87-
if err = client.ConnectGateway(context.TODO()); err != nil {
87+
if err = client.OpenGateway(context.TODO()); err != nil {
8888
log.Fatal("error while connecting to discord: ", err)
8989
}
9090

_examples/message_collector/example.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func main() {
3636

3737
defer client.Close(context.TODO())
3838

39-
if err = client.ConnectGateway(context.TODO()); err != nil {
39+
if err = client.OpenGateway(context.TODO()); err != nil {
4040
log.Fatal("error while connecting to gateway: ", err)
4141
}
4242

_examples/ping_pong/example.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func main() {
3535

3636
defer client.Close(context.TODO())
3737

38-
if err = client.ConnectGateway(context.TODO()); err != nil {
38+
if err = client.OpenGateway(context.TODO()); err != nil {
3939
log.Fatal("errors while connecting to gateway: ", err)
4040
}
4141

_examples/sharding/example.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func main() {
5353

5454
defer client.Close(context.TODO())
5555

56-
if err = client.ConnectShardManager(context.TODO()); err != nil {
56+
if err = client.OpenShardManager(context.TODO()); err != nil {
5757
log.Fatal("error while connecting to gateway: ", err)
5858
}
5959

0 commit comments

Comments
 (0)