mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Make ServerChannel GuildChannel
This commit is contained in:
@@ -18,7 +18,7 @@ function arraysEqual(a, b) {
|
||||
return b.length === 0;
|
||||
}
|
||||
|
||||
class ServerChannel extends Channel {
|
||||
class GuildChannel extends Channel {
|
||||
constructor(guild, data) {
|
||||
super(guild.client, data, guild);
|
||||
}
|
||||
@@ -146,4 +146,4 @@ class ServerChannel extends Channel {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ServerChannel;
|
||||
module.exports = GuildChannel;
|
||||
@@ -1,6 +1,6 @@
|
||||
class PermissionOverwrites {
|
||||
constructor(serverChannel, data) {
|
||||
this.channel = serverChannel;
|
||||
constructor(guildChannel, data) {
|
||||
this.channel = guildChannel;
|
||||
if (data) {
|
||||
this.setup(data);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
const ServerChannel = require('./ServerChannel');
|
||||
const GuildChannel = require('./GuildChannel');
|
||||
const TextChannelDataStore = require('./datastore/TextChannelDataStore');
|
||||
const TextBasedChannel = require('./interface/TextBasedChannel');
|
||||
|
||||
/**
|
||||
* Represents a Server Text Channel on Discord.
|
||||
*/
|
||||
class TextChannel extends ServerChannel {
|
||||
class TextChannel extends GuildChannel {
|
||||
|
||||
constructor(guild, data) {
|
||||
super(guild, data);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
const ServerChannel = require('./ServerChannel');
|
||||
const GuildChannel = require('./GuildChannel');
|
||||
const VoiceChannelDataStore = require('./datastore/VoiceChannelDataStore');
|
||||
|
||||
/**
|
||||
* Represents a Server Voice Channel on Discord.
|
||||
*/
|
||||
class VoiceChannel extends ServerChannel {
|
||||
class VoiceChannel extends GuildChannel {
|
||||
constructor(guild, data) {
|
||||
super(guild, data);
|
||||
this.store = new VoiceChannelDataStore();
|
||||
|
||||
@@ -6,7 +6,7 @@ const User = require('../User');
|
||||
const DMChannel = require('../DMChannel');
|
||||
const TextChannel = require('../TextChannel');
|
||||
const VoiceChannel = require('../VoiceChannel');
|
||||
const ServerChannel = require('../ServerChannel');
|
||||
const GuildChannel = require('../GuildChannel');
|
||||
|
||||
class ClientDataStore extends AbstractDataStore {
|
||||
constructor(client) {
|
||||
@@ -85,7 +85,7 @@ class ClientDataStore extends AbstractDataStore {
|
||||
|
||||
killChannel(channel) {
|
||||
this.remove('channels', channel);
|
||||
if (channel instanceof ServerChannel) {
|
||||
if (channel instanceof GuildChannel) {
|
||||
channel.guild.store.remove('channels', channel);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user