From 159233059e9ceb7d8375e5bf7416a4830857b75f Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 10:27:31 +0100 Subject: [PATCH] Make ServerChannel GuildChannel --- src/structures/{ServerChannel.js => GuildChannel.js} | 4 ++-- src/structures/PermissionOverwrites.js | 4 ++-- src/structures/TextChannel.js | 4 ++-- src/structures/VoiceChannel.js | 4 ++-- src/structures/datastore/ClientDataStore.js | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) rename src/structures/{ServerChannel.js => GuildChannel.js} (98%) diff --git a/src/structures/ServerChannel.js b/src/structures/GuildChannel.js similarity index 98% rename from src/structures/ServerChannel.js rename to src/structures/GuildChannel.js index 563058220..5585d58a5 100644 --- a/src/structures/ServerChannel.js +++ b/src/structures/GuildChannel.js @@ -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; diff --git a/src/structures/PermissionOverwrites.js b/src/structures/PermissionOverwrites.js index 47177d3fc..08af23a3e 100644 --- a/src/structures/PermissionOverwrites.js +++ b/src/structures/PermissionOverwrites.js @@ -1,6 +1,6 @@ class PermissionOverwrites { - constructor(serverChannel, data) { - this.channel = serverChannel; + constructor(guildChannel, data) { + this.channel = guildChannel; if (data) { this.setup(data); } diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index 6775e2989..6e364c1eb 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -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); diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index 8e01ebfc1..1eb0d0718 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -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(); diff --git a/src/structures/datastore/ClientDataStore.js b/src/structures/datastore/ClientDataStore.js index b62e97af5..8c170994e 100644 --- a/src/structures/datastore/ClientDataStore.js +++ b/src/structures/datastore/ClientDataStore.js @@ -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); } }