delete(options) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            const { timeout = 0 } = options;
            if (timeout <= 0) {
                //@ts-ignore
                this.client.api
                    //@ts-ignore
                    .webhooks((_a = this.client.user) === null || _a === void 0 ? void 0 : _a.id, this.token)
                    .messages("@original")
                    .delete()
                    .catch((err) => {
                    throw new error_1.default(`Cannot delete an message: ${err}`);
                });
            }
            else {
                setTimeout(() => {
                    var _a;
                    //@ts-ignore
                    this.client.api
                        //@ts-ignore
                        .webhooks((_a = this.client.user) === null || _a === void 0 ? void 0 : _a.id, this.token)
                        .messages("@original")
                        .delete()
                        .catch((err) => {
                        throw new error_1.default(`Cannot delete an message: ${err}`);
                    });
                }, timeout);
            }
        });
    }
/**
     * Deleting our interaction response, there needs to be an existing response.
     * @example interaction.delete()
     */
Deleting our interaction response, there needs to be an existing response.
Deleting our interaction response there needs to be an existing response .
delete(options) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            const { timeout = 0 } = options;
            if (timeout <= 0) {
                this.client.api
                    .webhooks((_a = this.client.user) === null || _a === void 0 ? void 0 : _a.id, this.token)
                    .messages("@original")
                    .delete()
                    .catch((err) => {
                    throw new error_1.default(`Cannot delete an message: ${err}`);
                });
            }
            else {
                setTimeout(() => {
                    var _a;
                    this.client.api
                        .webhooks((_a = this.client.user) === null || _a === void 0 ? void 0 : _a.id, this.token)
                        .messages("@original")
                        .delete()
                        .catch((err) => {
                        throw new error_1.default(`Cannot delete an message: ${err}`);
                    });
                }, timeout);
            }
        });
    }
delete ( options ) { var _a ; return __awaiter ( this , void 0 , void 0 , function * ( ) { const { timeout = 0 } = options ; if ( timeout <= 0 ) { this . client . api . webhooks ( ( _a = this . client . user ) === null || _a === void 0 ? void 0 : _a . id , this . token ) . messages ( "@original" ) . delete ( ) . catch ( ( err ) => { throw new error_1 . default ( ` ${ err } ` ) ; } ) ; } else { setTimeout ( ( ) => { var _a ; this . client . api . webhooks ( ( _a = this . client . user ) === null || _a === void 0 ? void 0 : _a . id , this . token ) . messages ( "@original" ) . delete ( ) . catch ( ( err ) => { throw new error_1 . default ( ` ${ err } ` ) ; } ) ; } , timeout ) ; } } ) ; }
Deleting our interaction response, there needs to be an existing response.
Deleting our interaction response there needs to be an existing response .
//@ts-ignore //@ts-ignore //@ts-ignore //@ts-ignore