From 5fefaf07c45cb3d2451986384fbf39195b8e03bc Mon Sep 17 00:00:00 2001 From: mavolin <48887425+mavolin@users.noreply.github.com> Date: Fri, 22 May 2020 19:45:44 +0200 Subject: [PATCH] API: fix #89 --- api/invite.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/api/invite.go b/api/invite.go index 2d59eb1..81124d6 100644 --- a/api/invite.go +++ b/api/invite.go @@ -91,10 +91,11 @@ func (c *Client) CreateInvite( ) } -// DeleteInvite deletes a channel permission overwrite for a user or role in a -// channel. Only usable for guild channels. +// DeleteInvite deletes an invite. // -// Requires the MANAGE_ROLES permission. +// Requires the MANAGE_CHANNELS permission on the channel this invite belongs +// to, or MANAGE_GUILD to remove any invite across the guild. +// Fires a Invite Delete Gateway event. func (c *Client) DeleteInvite(code string) (*discord.Invite, error) { var inv *discord.Invite return inv, c.RequestJSON(&inv, "DELETE", EndpointInvites+code)