mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-17 10:27:05 -04:00
forwards support pt. 1
This commit is contained in:
parent
5c13db8f62
commit
35c95a748e
2 changed files with 3 additions and 1 deletions
|
@ -6,6 +6,8 @@ module.exports.attachmentTypes = attachmentTypes
|
|||
|
||||
// Returns the first attachment from a message (if it exists)
|
||||
function getMessageAttachment(message) {
|
||||
if(message.messageSnapshots && message.messageSnapshots.length >= 1) message = message.messageSnapshots.first().message
|
||||
|
||||
if (message.attachments.first()) {
|
||||
return message.attachments.first()
|
||||
} else if (message.embeds.length && message.embeds.toArray()[0].image) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue