Make all RestAPI calls use Endpoints object

This commit is contained in:
Nuckyz 2024-05-13 23:00:02 -03:00
parent 9dc8e4e244
commit d4ebfc233f
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
11 changed files with 22 additions and 21 deletions

View file

@ -27,6 +27,7 @@ import { findByPropsLazy, findComponentByCodeLazy } from "@webpack";
import {
Button,
ChannelStore,
Constants,
FluxDispatcher,
GuildStore,
IconUtils,
@ -132,7 +133,7 @@ async function fetchMessage(channelID: string, messageID: string) {
messageCache.set(messageID, { fetched: false });
const res = await RestAPI.get({
url: `/channels/${channelID}/messages`,
url: Constants.Endpoints.MESSAGES(channelID),
query: {
limit: 1,
around: messageID