mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 17:43:30 +01:00
Deleted examples, beginning to write in EC6.
Examples and Hydrabot will soon live in a separate repo which is better suited to learning - this is so the main package isn't bloated.
This commit is contained in:
28
src/channel.js
Normal file
28
src/channel.js
Normal file
@@ -0,0 +1,28 @@
|
||||
var List = require("./list.js").List;
|
||||
|
||||
exports.Channel = function(name, server, type, id, isPrivate){
|
||||
|
||||
if(!type){ //there's no second argument
|
||||
var channel = name;
|
||||
name = channel.name;
|
||||
server = server;
|
||||
type = channel.type;
|
||||
id = channel.id;
|
||||
isPrivate = channel.is_private;
|
||||
}
|
||||
|
||||
this.name = name;
|
||||
this.server = server;
|
||||
this.type = type;
|
||||
this.id = id;
|
||||
this.isPrivate = isPrivate;
|
||||
this.messages = new List("id", 5000);
|
||||
}
|
||||
|
||||
exports.Channel.equals = function(otherChannel){
|
||||
if(otherChannel.id === this.id){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user