refactor(Channel): change channel types to UPPER_CASE (#6035)

This commit is contained in:
Rodry
2021-07-08 21:32:19 +01:00
committed by GitHub
parent b170fb5ce8
commit 6301728d35
26 changed files with 190 additions and 154 deletions

View File

@@ -1,7 +1,7 @@
'use strict';
const Action = require('./Action');
const { Events } = require('../../util/Constants');
const { Events, VoiceBasedChannelTypes } = require('../../util/Constants');
const { PartialTypes } = require('../../util/Constants');
/*
@@ -23,7 +23,7 @@ class MessageReactionAdd extends Action {
// Verify channel
const channel = this.getChannel(data);
if (!channel || channel.type === 'voice') return false;
if (!channel || channel.type in VoiceBasedChannelTypes) return false;
// Verify message
const message = this.getMessage(data, channel);