1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-12-03 20:32:55 +00:00

API: Fix Client.{Guild,}Command() (#264)

This commit is contained in:
Nat 2021-08-15 15:27:22 +10:00 committed by GitHub
parent e97dcb750c
commit dbfc49fb08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,11 +23,11 @@ func (c *Client) Commands(appID discord.AppID) ([]discord.Command, error) {
}
func (c *Client) Command(
appID discord.AppID, commandID discord.CommandID) ([]discord.Command, error) {
appID discord.AppID, commandID discord.CommandID) (discord.Command, error) {
var cmds []discord.Command
return cmds, c.RequestJSON(
&cmds, "GET",
var cmd discord.Command
return cmd, c.RequestJSON(
&cmd, "GET",
EndpointApplications+appID.String()+"/commands/"+commandID.String(),
)
}
@ -91,11 +91,11 @@ func (c *Client) GuildCommands(
func (c *Client) GuildCommand(
appID discord.AppID,
guildID discord.GuildID,
commandID discord.CommandID) ([]discord.Command, error) {
commandID discord.CommandID) (discord.Command, error) {
var cmds []discord.Command
return cmds, c.RequestJSON(
&cmds, "GET",
var cmd discord.Command
return cmd, c.RequestJSON(
&cmd, "GET",
EndpointApplications+appID.String()+
"/guilds/"+guildID.String()+
"/commands/"+commandID.String(),