-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add start of message payload (#118)
- Loading branch information
1 parent
c20730b
commit 9e087a2
Showing
10 changed files
with
91 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@buape/carbon": minor | ||
--- | ||
|
||
feat: add MessagePayload for replies and message sending | ||
This will allow you to pass just a string to reply with as the content, or the entire message payload. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import type { Embed } from "./classes/Embed.js" | ||
import type { Row } from "./classes/Row.js" | ||
|
||
/** | ||
* The data that is sent to Discord when sending a message. | ||
* If you pass just a string, it will be treated as the content of the message. | ||
*/ | ||
export type MessagePayload = | ||
| { | ||
/** | ||
* The content of the message | ||
*/ | ||
content?: string | ||
/** | ||
* The embeds of the message | ||
*/ | ||
embeds?: Embed[] | ||
/** | ||
* The components to send in the message, listed in rows | ||
*/ | ||
components?: Row[] | ||
/** | ||
* The settings for which mentions are allowed in the message | ||
*/ | ||
allowedMentions?: { | ||
parse?: ["roles", "users", "everyone"] | ||
roles?: string[] | ||
users?: string[] | ||
} | ||
/** | ||
* The flags for the message | ||
*/ | ||
flags?: number | ||
/** | ||
* Whether the message should be TTS | ||
*/ | ||
tts?: boolean | ||
} | ||
| string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters