-
Notifications
You must be signed in to change notification settings - Fork 98
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
Fix Guild Bans #279
base: main
Are you sure you want to change the base?
Fix Guild Bans #279
Conversation
I've added back support for the |
lib/discordrb/data/member.rb
Outdated
@@ -247,10 +247,17 @@ def server_unmute | |||
end | |||
|
|||
# Bans this member from the server. | |||
# @param message_days [Integer] How many days worth of messages sent by the member should be deleted. | |||
# @param message_days [Integer] How many days worth of messages sent by the member should be deleted. This will be deprecated in 4.0. |
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.
Shouldn’t this parameter be deprecated now and removed in 4.0?
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.
As per what @swarley has said in DAPI I was told to keep the argument as is and add seconds as an optional KWARG.
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.
I think that comment referred to keeping it in version 3.x
, not in 4.0
. In semantic versioning (semver), a breaking change, like a backwards incompatible method signature change, is only allowed during major version changes, such as 3.x
to 4.0
. A deprecation is a warning that it will be removed in a future version, in this case likely 4.0
. Therefore, it should be deprecated now and removed in 4.0
, not, as the comment claims, be deprecated in 4.0
, which would imply its existence in 4.0
(and thus its removal not earlier than in 5.0
).
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.
I think that comment referred to keeping it in version
3.x
, not in4.0
. In semantic versioning (semver), a breaking change, like a backwards incompatible method signature change, is only allowed during major version changes, such as3.x
to4.0
. A deprecation is a warning that it will be removed in a future version, in this case likely4.0
. Therefore, it should be deprecated now and removed in4.0
, not, as the comment claims, be deprecated in4.0
, which would imply its existence in4.0
(and thus its removal not earlier than in5.0
).
Oh whoops. Seems like I misunderstood what you mean.
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.
I've made a few changes and responded to most of the comments. Please take a look whenever you have the chance. 🙇♂️
lib/discordrb/data/member.rb
Outdated
@@ -247,10 +247,17 @@ def server_unmute | |||
end | |||
|
|||
# Bans this member from the server. | |||
# @param message_days [Integer] How many days worth of messages sent by the member should be deleted. | |||
# @param message_days [Integer] How many days worth of messages sent by the member should be deleted. This will be deprecated in 4.0. |
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.
As per what @swarley has said in DAPI I was told to keep the argument as is and add seconds as an optional KWARG.
Summary
Updates the ban API call, abstractions, and inline docs, to support cleaning messages as the old
delete_message_days
parameter has been replaced bydelete_message_seconds
, and adds support for sending an X-Audit-Log-Reason header.Fixed
No audit log reason for guild bans, and broken clean messages parameter.