Update New Method

This commit is contained in:
March 7th
2022-03-28 20:46:18 +07:00
parent 21446dad38
commit 26c1e01a5f
7 changed files with 100 additions and 6 deletions

View File

@@ -456,8 +456,8 @@ class ApplicationCommand extends Base {
* const command = application.commands.first();
* await command.sendContextMenu(messsage);
*/
async sendContextMenu(message) {
if (!message instanceof Message) throw new TypeError('The message must be a Discord.Message');
async sendContextMenu(message, sendFromMessage = false) {
if (!message instanceof Message && !sendFromMessage) throw new TypeError('The message must be a Discord.Message');
if (this.type == 'CHAT_INPUT') return false;
await this.client.api.interactions.post({ body: {
type: 2, // ???