diff --git a/README.md b/README.md index 2853317..ad6bbe3 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@

Discord server npm version - Gitbook + Gitbook

@@ -15,21 +15,6 @@ Slashasaurus is a command framework built on top of Discord.js. It's inspired by It is _strongly_ recommended that you use [TypeScript](https://www.typescriptlang.org/) with this library, however, it is not a requirement. The quick start is written in TypeScript, most information should be very similar for vanilla JS. -## Table of Contents - -- [Installation](#installation) -- [Docs](#docs) -- [Latest Changelogs](#latest-changelogs) - - [0.5.0](#050) - - [0.4.6](#046) - - [0.4.5](#045) - - [0.4.4](#044) - - [0.4.3](#043) - - [0.4.2](#042) - - [0.4.1](#041) - - [0.4.0](#040) - - [0.3.0](#030) - ## Installation To start a new project with Slashasaurus, you need to install discord.js as well as slashasaurus. @@ -50,42 +35,4 @@ See [discord.js's readme](https://github.com/discordjs/discord.js#optional-packa ## Latest Changelogs -### 0.5.0 - -Custom `transformer`s for autocomplete options! Now, you can specify a `transformer` function on an autocomplete option to transform the value before it is passed to the handler. (And the types will still be correct!) Have a custom autocomplete for dates? Now you can transform the date before it is passed to the handler. Autocomplete option that uses fuzzy search on something from your database? Now you can get the database object passed right into the handler. - -### 0.4.6 - -Hopefully the last round of fixes with comparing messages is done. There's lots of little weird quirks with Discord's API that need to be accounted for. This update also updates the message data when a component on an ephemeral Page is used. This allows the Page to be useful beyond the initial 15 minutes of the interaction that triggered the Page. - -### 0.4.5 - -- Add fix for async render functions -- Fix for some issues related to children of `PageActionRow`s - -### 0.4.4 - -- More fixes related to Pages and caching -- Fix for a couple more comparison issues on embeds - -### 0.4.3 - -- A couple small fixes with converting TSX and the `{condition && ...}` syntax - -### 0.4.2 - -- A couple small fixes when detecting whether or not a Page was updated after a reload from persistent storage. - - Specifically dealing with emoji and labels in buttons and colors in embeds - -### 0.4.1 - -- A couple small fixes when detecting whether or not a Page was updated after a reload from persistent storage. -- Added support for using `{condition && ...}` inside jsx. - -### 0.4.0 - -Added support for specifying an `onAutocomplete` handler for autocomplete args. This allows for easily re-usable autocomplete handlers for things that may be common across multiple commands in your bot. - -### 0.3.0 - -Added TSX support, see the end of the Pages section for details +Check out the [releases on GitHub](https://github.com/Rodentman87/slashasaurus/releases) for the latest changelogs. diff --git a/package.json b/package.json index c7c501c..5f11573 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "slashasaurus", - "version": "0.5.1", + "version": "0.5.2", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", diff --git a/src/SlashasaurusClient.ts b/src/SlashasaurusClient.ts index f770dc3..ea7190a 100644 --- a/src/SlashasaurusClient.ts +++ b/src/SlashasaurusClient.ts @@ -834,6 +834,8 @@ export class SlashasaurusClient extends Client { const renderedPage = await page.render(); if (!compareMessages(interaction.message, renderedPage)) { await interaction.update({ + content: null, + embeds: null, ...renderedPage, components: renderedPage.components ? pageComponentRowsToComponents(renderedPage.components, page) @@ -995,7 +997,7 @@ export class SlashasaurusClient extends Client { if ( message instanceof PageInteractionReplyMessage && page.latestInteraction && - !page.latestInteraction.deferred + !(page.latestInteraction.deferred || page.latestInteraction.replied) ) { await page.latestInteraction.update({ ...messageOptions,