The changes replace the parse-duration library with ms for parsing duration strings in the blacklist handler and related commands. This simplifies the code and provides a more consistent way of handling duration inputs.
The main changes include:
Replacing parse(interaction.fields.getTextInputValue('duration')) with ms(interaction.fields.getTextInputValue('duration')) in the getModalData method of the BaseBlacklistHandler class.
Replacing parse(cooldown, 'hour') with ms(cooldown) / 1000 / 60 / 60 in the handleAppealCooldown method of the AppealCommand class.
Replacing parse(expiryStr) with ms(expiryStr) in the Invite command class.
Replacing parse(expiryStr) with ms(expiryStr) in the ServerBlacklist command class.
These changes improve the overall consistency and maintainability of the codebase.
The changes replace the
parse-duration
library withms
for parsing duration strings in the blacklist handler and related commands. This simplifies the code and provides a more consistent way of handling duration inputs.The main changes include:
parse(interaction.fields.getTextInputValue('duration'))
withms(interaction.fields.getTextInputValue('duration'))
in thegetModalData
method of theBaseBlacklistHandler
class.parse(cooldown, 'hour')
withms(cooldown) / 1000 / 60 / 60
in thehandleAppealCooldown
method of theAppealCommand
class.parse(expiryStr)
withms(expiryStr)
in theInvite
command class.parse(expiryStr)
withms(expiryStr)
in theServerBlacklist
command class.These changes improve the overall consistency and maintainability of the codebase.