MessageLinkEmbeds: Use api
This commit is contained in:
parent
a11d5a9111
commit
5d1d054b7e
|
@ -16,6 +16,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { updateMessageComponent } from "@api/ComponentUpdater";
|
||||||
import { addAccessory } from "@api/MessageAccessories";
|
import { addAccessory } from "@api/MessageAccessories";
|
||||||
import { definePluginSettings } from "@api/Settings";
|
import { definePluginSettings } from "@api/Settings";
|
||||||
import ErrorBoundary from "@components/ErrorBoundary";
|
import ErrorBoundary from "@components/ErrorBoundary";
|
||||||
|
@ -28,7 +29,6 @@ import { find, findByCode, findByPropsLazy } from "@webpack";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
ChannelStore,
|
ChannelStore,
|
||||||
FluxDispatcher,
|
|
||||||
GuildStore,
|
GuildStore,
|
||||||
MessageStore,
|
MessageStore,
|
||||||
Parser,
|
Parser,
|
||||||
|
@ -228,10 +228,7 @@ function MessageEmbedAccessory({ message }: { message: Message; }) {
|
||||||
delete msg.interaction;
|
delete msg.interaction;
|
||||||
|
|
||||||
messageFetchQueue.push(() => fetchMessage(channelID, messageID)
|
messageFetchQueue.push(() => fetchMessage(channelID, messageID)
|
||||||
.then(m => m && FluxDispatcher.dispatch({
|
.then(m => m && updateMessageComponent(message.id))
|
||||||
type: "MESSAGE_UPDATE",
|
|
||||||
message: msg
|
|
||||||
}))
|
|
||||||
);
|
);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue