mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-01-08 04:57:31 +00:00
gateway: Fix RequestGuildMembersCommand.GuildIDs
This commit is contained in:
parent
d97492348d
commit
d952c98829
|
@ -77,7 +77,9 @@ type InvalidSessionEvent bool
|
||||||
type RequestGuildMembersCommand struct {
|
type RequestGuildMembersCommand struct {
|
||||||
// GuildIDs contains the IDs of the guilds to request data from. Multiple
|
// GuildIDs contains the IDs of the guilds to request data from. Multiple
|
||||||
// guilds can only be requested when using user accounts.
|
// guilds can only be requested when using user accounts.
|
||||||
GuildIDs []discord.GuildID `json:"guild_ids"`
|
//
|
||||||
|
// The guild_id JSON key is intentional, despite the type being an array.
|
||||||
|
GuildIDs []discord.GuildID `json:"guild_id"`
|
||||||
|
|
||||||
// UserIDs contains the IDs of the users to request data for. If this is
|
// UserIDs contains the IDs of the users to request data for. If this is
|
||||||
// filled, then the Query field must be empty.
|
// filled, then the Query field must be empty.
|
||||||
|
|
|
@ -36,7 +36,7 @@ func TestRequestGuildMembersCommand(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(&cmd, map[string]interface{}{
|
assert(&cmd, map[string]interface{}{
|
||||||
"guild_ids": []interface{}{"123"},
|
"guild_id": []interface{}{"123"},
|
||||||
"user_ids": []interface{}{"456"},
|
"user_ids": []interface{}{"456"},
|
||||||
"presences": false,
|
"presences": false,
|
||||||
})
|
})
|
||||||
|
@ -49,7 +49,7 @@ func TestRequestGuildMembersCommand(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(&cmd, map[string]interface{}{
|
assert(&cmd, map[string]interface{}{
|
||||||
"guild_ids": []interface{}{"123"},
|
"guild_id": []interface{}{"123"},
|
||||||
"query": "",
|
"query": "",
|
||||||
"limit": float64(0),
|
"limit": float64(0),
|
||||||
"presences": false,
|
"presences": false,
|
||||||
|
@ -63,7 +63,7 @@ func TestRequestGuildMembersCommand(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(&cmd, map[string]interface{}{
|
assert(&cmd, map[string]interface{}{
|
||||||
"guild_ids": []interface{}{"123"},
|
"guild_id": []interface{}{"123"},
|
||||||
"query": "abc",
|
"query": "abc",
|
||||||
"limit": float64(0),
|
"limit": float64(0),
|
||||||
"presences": false,
|
"presences": false,
|
||||||
|
|
Loading…
Reference in a new issue