diff --git a/assets/endpoints.json b/assets/endpoints.json
new file mode 100644
index 00000000..8b0514ce
--- /dev/null
+++ b/assets/endpoints.json
@@ -0,0 +1,115 @@
+{
+ "USER_CHANNELS": "/users/@me/channels",
+ "USER_ACTIVITY_STATISTICS": "/users/@me/activities/statistics/applications",
+ "ACTIVITIES": "/activities",
+ "LOBBIES": "/lobbies",
+ "LOBBY_SEARCH": "/lobbies/search",
+ "NETWORKING_TOKEN": "/networking/token",
+ "USER_GAMES_NOTIFICATIONS": "/users/@me/settings/game-notifications",
+ "USER_GAMES_NOTIFICATIONS_OVERRIDES": "/users/@me/settings/game-notifications/overrides",
+ "UNVERIFIED_APPLICATIONS": "/unverified-applications",
+ "UNVERIFIED_APPLICATIONS_ICONS": "/unverified-applications/icons",
+ "BULK_ACK": "/read-states/ack-bulk",
+ "GUILDS": "/guilds",
+ "CHANNELS": "/channels",
+ "TUTORIAL_INDICATORS": "/tutorial/indicators",
+ "TUTORIAL_INDICATORS_SUPPRESS": "/tutorial/indicators/suppress",
+ "USERS": "/users",
+ "ME": "/users/@me",
+ "DELETE_ACCOUNT": "/users/@me/delete",
+ "DISABLE_ACCOUNT": "/users/@me/disable",
+ "DEVICES": "/users/@me/devices",
+ "SETTINGS": "/users/@me/settings",
+ "SETTINGS_CONSENT": "/users/@me/consent",
+ "PHONE": "/users/@me/phone",
+ "VERIFY_PHONE": "/users/@me/phone/verify",
+ "VERIFY_PHONE_NEW": "/phone-verifications/verify",
+ "RESEND_PHONE": "/phone-verifications/resend",
+ "CONNECTIONS": "/users/@me/connections",
+ "CONNECTION_SYNC_CONTACTS": "/users/@me/connections/contacts/@me/external-friend-list-entries",
+ "NOTES": "/users/@me/notes",
+ "MENTIONS": "/users/@me/mentions",
+ "CAPTCHA": "/users/@me/captcha/verify",
+ "EXPERIMENTS": "/experiments",
+ "LOGIN": "/auth/login",
+ "LOGIN_MFA": "/auth/mfa/totp",
+ "LOGIN_SMS": "/auth/mfa/sms",
+ "LOGIN_SMS_SEND": "/auth/mfa/sms/send",
+ "REMOTE_AUTH_INITIALIZE": "/users/@me/remote-auth",
+ "REMOTE_AUTH_CANCEL": "/users/@me/remote-auth/cancel",
+ "REMOTE_AUTH_FINISH": "/users/@me/remote-auth/finish",
+ "LOGOUT": "/auth/logout",
+ "REGISTER": "/auth/register",
+ "REGISTER_PHONE": "/auth/register/phone",
+ "TRACK": "/science",
+ "SSO": "/sso",
+ "VERIFY": "/auth/verify",
+ "AUTHORIZE_IP": "/auth/authorize-ip",
+ "VERIFY_RESEND": "/auth/verify/resend",
+ "FORGOT_PASSWORD": "/auth/forgot",
+ "RESET_PASSWORD": "/auth/reset",
+ "ICE": "/voice/ice",
+ "REPORT": "/report",
+ "REPORT_V2": "/reports",
+ "REPORT_OPTIONS": "/report/options",
+ "INTEGRATIONS": "/integrations",
+ "GATEWAY": "/gateway",
+ "APPLICATIONS_DETECTABLE": "/applications/detectable",
+ "OAUTH2_AUTHORIZE": "/oauth2/authorize",
+ "OAUTH2_AUTHORIZE_WEBHOOK_CHANNELS": "/oauth2/authorize/webhook-channels",
+ "OAUTH2_CURRENT_AUTH": "/oauth2/@me",
+ "OAUTH2_TOKENS": "/oauth2/tokens",
+ "OAUTH2_WHITELIST_ACCEPT": "/oauth2/whitelist/accept",
+ "MFA_TOTP_ENABLE": "/users/@me/mfa/totp/enable",
+ "MFA_TOTP_DISABLE": "/users/@me/mfa/totp/disable",
+ "MFA_SMS_ENABLE": "/users/@me/mfa/sms/enable",
+ "MFA_SMS_DISABLE": "/users/@me/mfa/sms/disable",
+ "MFA_CODES": "/users/@me/mfa/codes",
+ "DISABLE_EMAIL_NOTIFICATIONS": "/users/disable-email-notifications",
+ "GUILD_PREMIUM_SUBSCRIPTION_COOLDOWN": "/users/@me/guilds/premium/subscriptions/cooldown",
+ "USER_GUILD_PREMIUM_SUBSCRIPTIONS": "/users/@me/guilds/premium/subscriptions",
+ "USER_PREMIUM_GUILD_SUBSCRIPTION_SLOTS": "/users/@me/guilds/premium/subscription-slots",
+ "BILLING_STRIPE_SETUP_INTENT_SECRET": "/users/@me/billing/stripe/setup-intents",
+ "BILLING_PAYMENT_SOURCES": "/users/@me/billing/payment-sources",
+ "BILLING_PAYMENTS": "/users/@me/billing/payments",
+ "BILLING_BRAINTREE_POPUP_BRIDGE": "/billing/braintree/popup-bridge",
+ "BILLING_BRAINTREE_POPUP_BRIDGE_CALLBACK": "/billing/braintree/popup-bridge/callback",
+ "BILLING_SUBSCRIPTIONS": "/users/@me/billing/subscriptions",
+ "BILLING_APPLY_APPLE_RECEIPT": "/billing/apple/apply-receipt",
+ "BILLING_INVOICE_PREVIEW": "/users/@me/billing/invoices/preview",
+ "USER_AGREEMENTS": "/users/@me/agreements",
+ "HANDOFF": "/auth/handoff",
+ "HANDOFF_EXCHANGE": "/auth/handoff/exchange",
+ "LIBRARY": "/users/@me/library",
+ "AUTH_CONSENT_REQUIRED": "/auth/consent-required",
+ "USER_HARVEST": "/users/@me/harvest",
+ "APPLICATION_BRANCHES": "/branches",
+ "APPLICATIONS_PUBLIC": "/applications/public",
+ "APPLICATIONS_TRENDING": "/applications/trending/global",
+ "STORE_PUBLISHED_LISTINGS_APPLICATIONS": "/store/published-listings/applications",
+ "STORE_PUBLISHED_LISTINGS_SKUS": "/store/published-listings/skus",
+ "ENTITLEMENTS_GIFTABLE": "/users/@me/entitlements/gifts",
+ "PROMOTIONS": "/promotions",
+ "PROMOTION_ACK": "/promotions/ack",
+ "HYPESQUAD_ONLINE": "/hypesquad/online",
+ "GIFS_SEARCH": "/gifs/search",
+ "GIFS_TRENDING": "/gifs/trending",
+ "GIFS_TRENDING_GIFS": "/gifs/trending-gifs",
+ "GIFS_SELECT": "/gifs/select",
+ "GIFS_SUGGEST": "/gifs/suggest",
+ "GIFS_TRENDING_SEARCH": "/gifs/trending-search",
+ "USER_GIFT_CODE_CREATE": "/users/@me/entitlements/gift-codes",
+ "USER_GIFT_CODES": "/users/@me/entitlements/gift-codes",
+ "GUILD_DISCOVERY": "/discoverable-guilds",
+ "GUILD_DISCOVERY_CATEGORIES": "/discovery/categories",
+ "GUILD_DISCOVERY_VALID_TERM": "/discovery/valid-term",
+ "USER_AFFINITIES": "/users/@me/affinities/users",
+ "GUILD_AFFINITIES": "/users/@me/affinities/guilds",
+ "XBOX_GAME_PASS_PROMOTION": "/promotions/xbox-game-pass",
+ "XBOX_GAME_PASS_PROMOTION_REDEEM": "/promotions/xbox-game-pass/redeem",
+ "FUNIMATION_PROMOTION": "/promotions/funimation",
+ "PARTNERS_CONNECTIONS": "/partners/connections",
+ "PARTNERS_APPLY": "/partners/apply",
+ "USER_STICKER_PACKS": "/users/@me/sticker-packs",
+ "INTERACTIONS": "/interactions"
+}
diff --git a/package-lock.json b/package-lock.json
index 3cb81e98..e13791d1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4614,7 +4614,7 @@
},
"node_modules/fosscord-server-util": {
"version": "1.0.0",
- "resolved": "git+ssh://git@github.com/fosscord/fosscord-server-util.git#9d06aa09bf8e1b44766d502a5549ac49fcb79e4c",
+ "resolved": "git+ssh://git@github.com/fosscord/fosscord-server-util.git#e5f408be0889562f6fa36ac1bb1730e50bf1951f",
"license": "ISC",
"dependencies": {
"jsonwebtoken": "^8.5.1",
@@ -16151,7 +16151,7 @@
"integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
},
"fosscord-server-util": {
- "version": "git+ssh://git@github.com/fosscord/fosscord-server-util.git#9d06aa09bf8e1b44766d502a5549ac49fcb79e4c",
+ "version": "git+ssh://git@github.com/fosscord/fosscord-server-util.git#e5f408be0889562f6fa36ac1bb1730e50bf1951f",
"from": "fosscord-server-util@github:fosscord/fosscord-server-util",
"requires": {
"jsonwebtoken": "^8.5.1",
diff --git a/src/Server.ts b/src/Server.ts
index 3bc346e3..19a0fc5f 100644
--- a/src/Server.ts
+++ b/src/Server.ts
@@ -90,7 +90,7 @@ export class DiscordServer extends Server {
...req.headers,
},
});
- const buffer = await response.text();
+ const buffer = await response.buffer();
response.headers.forEach((value, name) => {
if (
diff --git a/src/util/Member.ts b/src/util/Member.ts
index 319eab60..2b268597 100644
--- a/src/util/Member.ts
+++ b/src/util/Member.ts
@@ -29,8 +29,6 @@ export async function addMember(user_id: bigint, guild_id: bigint, cache?: { gui
const user = await getPublicUser(user_id, { guilds: true });
const guildSize = user.guilds.length;
- // @ts-ignore
- user.guilds = undefined;
const { maxGuilds } = Config.get().limits.user;
if (guildSize >= maxGuilds) {
|