-
Notifications
You must be signed in to change notification settings - Fork 787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bulk delete #199
Bulk delete #199
Conversation
Requires a channelID and a slice of messageIDs from the channel. If only on ID is in the slice calls ChannelMessageDelete() internally. If the slice of IDs is empty do nothing.
Requires a channelID and a slice of messageIDs from the channel. If only on ID is in the slice calls ChannelMessageDelete() internally. If the slice of IDs is empty do nothing. Noted maximum of 100 messageIDs in the comment.
If more than 100 is present send the first 100 in the request and ignore the rest.
} | ||
|
||
if len(messages) > 100 { | ||
messages = messages[:100] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps you could call bulk delete multiple times for each group of 100 messages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is why I did not do it like that,
warn This endpoint has a rate limit of 1 request per second per guild, and is limited
to 100 messages per request.
The request will fail if less than two snowflakes are provided.
Only bot accounts can use this endpoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, Looks good to me!
Great job @VagantemNumen and thanks a lot for the help! I really appreciate it! |
Add bulk delete endpoint to rest api
Added bulk delete endpoint and bulk delete support.