Skip to content

Commit

Permalink
Merge branch 'development' into feature/new-select-menu-types
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed Nov 29, 2022
2 parents f903bc8 + ad09d87 commit cb56593
Show file tree
Hide file tree
Showing 59 changed files with 185 additions and 330 deletions.
73 changes: 0 additions & 73 deletions .github/workflows/go.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
@@ -0,0 +1,26 @@
name: Go

on: [ push ]

jobs:
gobuild:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
- uses: actions/checkout@v3
- name: go build
run: go build -v ./...

golangci:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
3 changes: 2 additions & 1 deletion _examples/application_commands/http/go.mod
Expand Up @@ -7,11 +7,12 @@ replace github.com/disgoorg/disgo => ../../../
require (
github.com/disgoorg/disgo v0.11.5
github.com/disgoorg/log v1.2.0
github.com/disgoorg/snowflake/v2 v2.0.0
github.com/disgoorg/snowflake/v2 v2.0.1
github.com/oasisprotocol/curve25519-voi v0.0.0-20220317090546-adb2f9614b17
)

require (
github.com/disgoorg/json v1.0.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/sasha-s/go-csync v0.0.0-20210812194225-61421b77c44b // indirect
golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e // indirect
Expand Down
12 changes: 7 additions & 5 deletions _examples/application_commands/http/go.sum
@@ -1,16 +1,18 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/disgoorg/json v1.0.0 h1:kDhSM661fgIuNoZF3BO5/odaR5NSq80AWb937DH+Pdo=
github.com/disgoorg/json v1.0.0/go.mod h1:BHDwdde0rpQFDVsRLKhma6Y7fTbQKub/zdGO5O9NqqA=
github.com/disgoorg/log v1.2.0 h1:sqlXnu/ZKAlIlHV9IO+dbMto7/hCQ474vlIdMWk8QKo=
github.com/disgoorg/log v1.2.0/go.mod h1:3x1KDG6DI1CE2pDwi3qlwT3wlXpeHW/5rVay+1qDqOo=
github.com/disgoorg/snowflake/v2 v2.0.0 h1:+xvyyDddXmXLHmiG8SZiQ3sdZdZPbUR22fSHoqwkrOA=
github.com/disgoorg/snowflake/v2 v2.0.0/go.mod h1:SPU9c2CNn5DSyb86QcKtdZgix9osEtKrHLW4rMhfLCs=
github.com/disgoorg/snowflake/v2 v2.0.1 h1:CuUxGLwggUxEswZOmZ+mZ5i0xSumQdXW9tXW7uGqe+0=
github.com/disgoorg/snowflake/v2 v2.0.1/go.mod h1:SPU9c2CNn5DSyb86QcKtdZgix9osEtKrHLW4rMhfLCs=
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/oasisprotocol/curve25519-voi v0.0.0-20220317090546-adb2f9614b17 h1:pxR+aWfo+famermIZvD+SiDQ3qmF7Iy2VPZuEsKTMtA=
github.com/oasisprotocol/curve25519-voi v0.0.0-20220317090546-adb2f9614b17/go.mod h1:WUcXjUd98qaCVFb6j8Xc87MsKeMCXDu9Nk8JRJ9SeC8=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/sasha-s/go-csync v0.0.0-20210812194225-61421b77c44b h1:qYTY2tN72LhgDj2rtWG+LI6TXFl2ygFQQ4YezfVaGQE=
github.com/sasha-s/go-csync v0.0.0-20210812194225-61421b77c44b/go.mod h1:/pA7k3zsXKdjjAiUhB5CjuKib9KJGCaLvZwtxGC8U0s=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e h1:VvfwVmMH40bpMeizC9/K7ipM5Qjucuu16RWfneFPyhQ=
golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/exp v0.0.0-20220325121720-054d8573a5d8 h1:Xt4/LzbTwfocTk9ZLEu4onjeFucl88iW+v4j4PWbQuE=
Expand All @@ -23,4 +25,4 @@ golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
6 changes: 3 additions & 3 deletions _examples/auto_moderation/example.go
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/disgoorg/disgo/discord"
"github.com/disgoorg/disgo/events"
"github.com/disgoorg/disgo/gateway"
"github.com/disgoorg/disgo/json"
"github.com/disgoorg/json"
"github.com/disgoorg/log"
"github.com/disgoorg/snowflake/v2"
)
Expand Down Expand Up @@ -82,7 +82,7 @@ func showCaseAutoMod(client bot.Client) {
Type: discord.AutoModerationActionTypeBlockMessage,
},
},
Enabled: true,
Enabled: json.Ptr(true),
})
if err != nil {
log.Error("error while creating rule: ", err)
Expand All @@ -92,7 +92,7 @@ func showCaseAutoMod(client bot.Client) {
time.Sleep(time.Second * 10)

rule, err = client.Rest().UpdateAutoModerationRule(guildID, rule.ID, discord.AutoModerationRuleUpdate{
Name: json.NewPtr("test-rule-updated"),
Name: json.Ptr("test-rule-updated"),
TriggerMetadata: &discord.AutoModerationTriggerMetadata{
KeywordFilter: []string{"*test2*"},
},
Expand Down
2 changes: 1 addition & 1 deletion _examples/oauth2/example.go
Expand Up @@ -9,9 +9,9 @@ import (

"github.com/disgoorg/disgo"
"github.com/disgoorg/disgo/discord"
"github.com/disgoorg/disgo/json"
"github.com/disgoorg/disgo/oauth2"
"github.com/disgoorg/disgo/rest"
"github.com/disgoorg/json"
"github.com/disgoorg/log"
"github.com/disgoorg/snowflake/v2"
)
Expand Down
2 changes: 1 addition & 1 deletion discord/access_token.go
Expand Up @@ -3,7 +3,7 @@ package discord
import (
"time"

"github.com/disgoorg/disgo/json"
"github.com/disgoorg/json"
)

// AccessTokenResponse is the response from the OAuth2 exchange endpoint.
Expand Down
2 changes: 1 addition & 1 deletion discord/activity.go
Expand Up @@ -3,7 +3,7 @@ package discord
import (
"time"

"github.com/disgoorg/disgo/json"
"github.com/disgoorg/json"
"github.com/disgoorg/snowflake/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion discord/application_command.go
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

"github.com/disgoorg/disgo/json"
"github.com/disgoorg/json"
"github.com/disgoorg/snowflake/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion discord/application_command_autocomplete_option.go
@@ -1,7 +1,7 @@
package discord

import (
"github.com/disgoorg/disgo/json"
"github.com/disgoorg/json"
)

type internalAutocompleteOption interface {
Expand Down
2 changes: 1 addition & 1 deletion discord/application_command_create.go
@@ -1,6 +1,6 @@
package discord

import "github.com/disgoorg/disgo/json"
import "github.com/disgoorg/json"

type ApplicationCommandCreate interface {
json.Marshaler
Expand Down
2 changes: 1 addition & 1 deletion discord/application_command_option.go
Expand Up @@ -3,7 +3,7 @@ package discord
import (
"fmt"

"github.com/disgoorg/disgo/json"
"github.com/disgoorg/json"
)

// ApplicationCommandOptionType specifies the type of the arguments used in ApplicationCommand.Options
Expand Down
2 changes: 1 addition & 1 deletion discord/application_command_permission.go
Expand Up @@ -3,7 +3,7 @@ package discord
import (
"fmt"

"github.com/disgoorg/disgo/json"
"github.com/disgoorg/json"
"github.com/disgoorg/snowflake/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion discord/application_command_raw.go
@@ -1,7 +1,7 @@
package discord

import (
"github.com/disgoorg/disgo/json"
"github.com/disgoorg/json"
"github.com/disgoorg/snowflake/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion discord/application_command_update.go
@@ -1,6 +1,6 @@
package discord

import "github.com/disgoorg/disgo/json"
import "github.com/disgoorg/json"

type ApplicationCommandUpdate interface {
json.Marshaler
Expand Down
2 changes: 1 addition & 1 deletion discord/audit_log.go
@@ -1,7 +1,7 @@
package discord

import (
"github.com/disgoorg/disgo/json"
"github.com/disgoorg/json"
"github.com/disgoorg/snowflake/v2"
)

Expand Down
1 change: 1 addition & 0 deletions discord/auto_moderation.go
Expand Up @@ -24,6 +24,7 @@ const (

type AutoModerationTriggerMetadata struct {
KeywordFilter []string `json:"keyword_filter"`
RegexPatterns []string `json:"regex_patterns"`
Presets []AutoModerationKeywordPreset `json:"presets"`
AllowList []string `json:"allow_list"`
MentionTotalLimit int `json:"mention_total_limit"`
Expand Down
2 changes: 1 addition & 1 deletion discord/channel.go
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

"github.com/disgoorg/disgo/json"
"github.com/disgoorg/json"
"github.com/disgoorg/snowflake/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion discord/channel_create.go
@@ -1,7 +1,7 @@
package discord

import (
"github.com/disgoorg/disgo/json"
"github.com/disgoorg/json"
"github.com/disgoorg/snowflake/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion discord/channel_update.go
@@ -1,7 +1,7 @@
package discord

import (
"github.com/disgoorg/disgo/json"
"github.com/disgoorg/json"
"github.com/disgoorg/snowflake/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion discord/channels_raw.go
Expand Up @@ -3,7 +3,7 @@ package discord
import (
"time"

"github.com/disgoorg/disgo/json"
"github.com/disgoorg/json"
"github.com/disgoorg/snowflake/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion discord/component.go
Expand Up @@ -3,7 +3,7 @@ package discord
import (
"fmt"

"github.com/disgoorg/disgo/json"
"github.com/disgoorg/json"
"github.com/disgoorg/snowflake/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion discord/file.go
Expand Up @@ -7,7 +7,7 @@ import (
"mime/multipart"
"net/textproto"

"github.com/disgoorg/disgo/json"
"github.com/disgoorg/json"
)

type Payload interface {
Expand Down
10 changes: 4 additions & 6 deletions discord/guild.go
Expand Up @@ -3,7 +3,7 @@ package discord
import (
"time"

"github.com/disgoorg/disgo/json"
"github.com/disgoorg/json"
"github.com/disgoorg/snowflake/v2"
)

Expand Down Expand Up @@ -108,11 +108,12 @@ type GuildFeature string

// Constants for GuildFeature
const (
GuildFeatureAnimatedIcon GuildFeature = "ANIMATED_ICON"
GuildFeatureAnimatedBanner GuildFeature = "ANIMATED_BANNER"
GuildFeatureAnimatedIcon GuildFeature = "ANIMATED_ICON"
GuildFeatureAutoModeration GuildFeature = "AUTO_MODERATION"
GuildFeatureBanner GuildFeature = "BANNER"
GuildFeatureCommerce GuildFeature = "COMMERCE"
GuildFeatureCommunity GuildFeature = "COMMUNITY"
GuildFeatureDeveloperSupportServer GuildFeature = "DEVELOPER_SUPPORT_SERVER"
GuildFeatureDiscoverable GuildFeature = "DISCOVERABLE"
GuildFeatureFeaturable GuildFeature = "FEATURABLE"
GuildFeatureInvitesDisabled GuildFeature = "INVITES_DISABLED"
Expand All @@ -123,10 +124,7 @@ const (
GuildFeatureNews GuildFeature = "NEWS"
GuildFeaturePartnered GuildFeature = "PARTNERED"
GuildFeaturePreviewEnabled GuildFeature = "PREVIEW_ENABLED"
GuildFeaturePrivateThreads GuildFeature = "PRIVATE_THREADS"
GuildFeatureRoleIcons GuildFeature = "ROLE_ICONS"
GuildFeatureSevenDayThreadArchive GuildFeature = "SEVEN_DAY_THREAD_ARCHIVE"
GuildFeatureThreeDayThreadArchive GuildFeature = "THREE_DAY_THREAD_ARCHIVE"
GuildFeatureTicketedEventsEnabled GuildFeature = "TICKETED_EVENTS_ENABLED"
GuildFeatureVanityURL GuildFeature = "VANITY_URL"
GuildFeatureVerified GuildFeature = "VERIFIED"
Expand Down
2 changes: 1 addition & 1 deletion discord/icon.go
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"io"

"github.com/disgoorg/disgo/json"
"github.com/disgoorg/json"
)

type IconType string
Expand Down
2 changes: 1 addition & 1 deletion discord/icon_test.go
Expand Up @@ -3,7 +3,7 @@ package discord
import (
"testing"

"github.com/disgoorg/disgo/json"
"github.com/disgoorg/json"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion discord/integration.go
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

"github.com/disgoorg/disgo/json"
"github.com/disgoorg/json"
"github.com/disgoorg/snowflake/v2"
)

Expand Down

0 comments on commit cb56593

Please sign in to comment.