mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
Did this work?
idk
This commit is contained in:
17
src/Embeds/IEmbed.js
Normal file
17
src/Embeds/IEmbed.js
Normal file
@@ -0,0 +1,17 @@
|
||||
var ImageEmbed = require("./ImageEmbed.js"),
|
||||
VideoEmbed = require("./VideoEmbed.js"),
|
||||
LinkEmbed = require("./LinkEmbed.js");
|
||||
|
||||
exports.createEmbed = function(data){
|
||||
switch(data.type){
|
||||
case "image":
|
||||
return new ImageEmbed(data);
|
||||
break;
|
||||
case "video":
|
||||
return new VideoEmbed(data);
|
||||
break;
|
||||
case "link":
|
||||
return new LinkEmbed(data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user