diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-05-05 18:03:04 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-05-05 18:03:04 +0200 |
| commit | a5bd191b194ca97afd777a4bb523981e4855df92 (patch) | |
| tree | 8242a790df39813187b8ba84d5985e90620a0890 /util.js | |
| parent | 0e5a0b876aa36786430d313f8ded843aa849eb00 (diff) | |
| download | discordbot-a5bd191b194ca97afd777a4bb523981e4855df92.tar.gz discordbot-a5bd191b194ca97afd777a4bb523981e4855df92.zip | |
refactor, fix caching
Diffstat (limited to 'util.js')
| -rw-r--r-- | util.js | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -99,8 +99,9 @@ module.exports.respond = async (msg, data, response) => { if (data != response.content) await response.edit(data); } else { - if (new Date(response.embeds[0].createdTimestamp).getTime() - != data.timestamp.getTime()) + if (response.embeds.length ==0 || + new Date(response.embeds[0].createdTimestamp).getTime() + != data.timestamp.getTime()) // TODO how2 edit embed properly?! await msg.editResponse(response, { type: "plain", |
