refactor(Channels): fix incorrectly shared properties (#6262)

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
This commit is contained in:
monbrey
2021-08-05 06:55:31 +10:00
committed by GitHub
parent ae6200e58e
commit 5be471b47d
8 changed files with 341 additions and 275 deletions

View File

@@ -1,20 +1,13 @@
'use strict';
const TextChannel = require('./TextChannel');
const BaseGuildTextChannel = require('./BaseGuildTextChannel');
const { Error } = require('../errors');
/**
* Represents a guild news channel on Discord.
* @extends {TextChannel}
* @extends {BaseGuildTextChannel}
*/
class NewsChannel extends TextChannel {
_patch(data) {
super._patch(data);
// News channels don't have a rate limit per user, remove it
this.rateLimitPerUser = undefined;
}
class NewsChannel extends BaseGuildTextChannel {
/**
* Adds the target to this channel's followers.
* @param {GuildChannelResolvable} channel The channel where the webhook should be created