This commit is contained in:
Skillz4Killz
2021-04-08 14:35:33 +00:00
committed by GitHub
parent d016fc3764
commit 2babaf5991
8 changed files with 60 additions and 45 deletions
+15 -17
View File
@@ -92,23 +92,21 @@ export async function sendMessage(
}
}
const result =
(await rest.runMethod(
"post",
endpoints.CHANNEL_MESSAGES(channelId),
camelKeysToSnakeCase({
...content,
...(content.messageReference?.messageId
? {
messageReference: {
...content.messageReference,
failIfNotExists:
content.messageReference.failIfNotExists === true,
},
}
: {}),
}),
)) as DiscordMessage;
const result = (await rest.runMethod(
"post",
endpoints.CHANNEL_MESSAGES(channelId),
camelKeysToSnakeCase({
...content,
...(content.messageReference?.messageId
? {
messageReference: {
...content.messageReference,
failIfNotExists: content.messageReference.failIfNotExists === true,
},
}
: {}),
}),
)) as DiscordMessage;
return structures.createMessageStruct(result);
}