mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-18 02:47: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)
|
// Returns the first attachment from a message (if it exists)
|
||||||
function getMessageAttachment(message) {
|
function getMessageAttachment(message) {
|
||||||
|
if(message.messageSnapshots && message.messageSnapshots.length >= 1) message = message.messageSnapshots.first().message
|
||||||
|
|
||||||
if (message.attachments.first()) {
|
if (message.attachments.first()) {
|
||||||
return message.attachments.first()
|
return message.attachments.first()
|
||||||
} else if (message.embeds.length && message.embeds.toArray()[0].image) {
|
} else if (message.embeds.length && message.embeds.toArray()[0].image) {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
"author": "bignutty",
|
"author": "bignutty",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"detritus-client": "^0.17.0-beta.29",
|
"detritus-client": "^0.17.0-beta.40",
|
||||||
"dotenv": "^16.4.5",
|
"dotenv": "^16.4.5",
|
||||||
"emoji-aware": "^3.1.0",
|
"emoji-aware": "^3.1.0",
|
||||||
"eventemitter3": "^4.0.7",
|
"eventemitter3": "^4.0.7",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue