Skip to content

Commit

Permalink
refactor(GuildManager): apply review suggestion in more places
Browse files Browse the repository at this point in the history
  • Loading branch information
iShibi committed Jun 13, 2021
1 parent 521e9d1 commit bb89aff
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/managers/GuildManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,17 +167,11 @@ class GuildManager extends BaseManager {
if (typeof verificationLevel === 'string') {
verificationLevel = VerificationLevels[verificationLevel];
}
if (defaultMessageNotifications) {
defaultMessageNotifications =
typeof defaultMessageNotifications === 'number'
? defaultMessageNotifications
: DefaultMessageNotificationLevels[defaultMessageNotifications];
if (typeof defaultMessageNotifications === 'string') {
defaultMessageNotifications = DefaultMessageNotificationLevels[defaultMessageNotifications];
}
if (explicitContentFilter) {
explicitContentFilter =
typeof explicitContentFilter === 'number'
? explicitContentFilter
: ExplicitContentFilterLevels[explicitContentFilter];
if (typeof explicitContentFilter === 'string') {
explicitContentFilter = ExplicitContentFilterLevels[explicitContentFilter];
}
for (const channel of channels) {
if (channel.type) channel.type = ChannelTypes[channel.type.toUpperCase()];
Expand Down

0 comments on commit bb89aff

Please sign in to comment.