Allow for preliminary support for embeds by passing objects to send function
This commit is contained in:
parent
b4f6300a23
commit
a3452fbebb
@ -2,7 +2,7 @@
|
||||
"main": "plugin.js",
|
||||
"name": "discord",
|
||||
"description": "Discord Service for Squeebot 3",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.1",
|
||||
"tags": ["service", "discord"],
|
||||
"dependencies": ["control?"],
|
||||
"npmDependencies": ["discord.js@^12.5.1"]
|
||||
|
@ -168,6 +168,10 @@ class DiscordProtocol extends Protocol {
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Discord supports sending objects to the channel for things like embeds
|
||||
else if (typeof data[0] === 'object') {
|
||||
response = data[0];
|
||||
}
|
||||
|
||||
msg.data.channel.send(response).catch((e: Error) => {
|
||||
logger.error(e);
|
||||
|
Loading…
Reference in New Issue
Block a user