diff --git a/rest/createRequestBody.ts b/rest/createRequestBody.ts index ea2681a99..5f64438a0 100644 --- a/rest/createRequestBody.ts +++ b/rest/createRequestBody.ts @@ -18,6 +18,7 @@ export function createRequestBody(rest: RestManager, queuedRequest: { request: R // IF A REASON IS PROVIDED ENCODE IT IN HEADERS if (queuedRequest.payload.body?.reason) { headers["X-Audit-Log-Reason"] = encodeURIComponent(queuedRequest.payload.body.reason as string); + queuedRequest.payload.body.reason = undefined; } // IF A FILE/ATTACHMENT IS PRESENT WE NEED SPECIAL HANDLING diff --git a/rest/rest_manager.ts b/rest/rest_manager.ts index 1fb0b52d9..05cfc151c 100644 --- a/rest/rest_manager.ts +++ b/rest/rest_manager.ts @@ -10,9 +10,10 @@ import { RestPayload, RestRateLimitedPath, RestRequest } from "./rest.ts"; import { runMethod } from "./runMethod.ts"; import { simplifyUrl } from "./simplifyUrl.ts"; import { baseEndpoints } from "../util/constants.ts"; +import { API_VERSION } from "../util/constants.ts"; export function createRestManager(options: CreateRestManagerOptions) { - const version = options.version || "9"; + const version = options.version || API_VERSION; if (options.customUrl) { baseEndpoints.BASE_URL = `${options.customUrl}/v${version}`; diff --git a/transformers/application.ts b/transformers/application.ts index d691a1e59..2efa784a8 100644 --- a/transformers/application.ts +++ b/transformers/application.ts @@ -14,7 +14,6 @@ export function transformApplication(bot: Bot, payload: SnakeCasedPropertiesDeep botRequireCodeGrant: payload.bot_require_code_grant, termsOfServiceUrl: payload.terms_of_service_url, privacyPolicyUrl: payload.privacy_policy_url, - summary: payload.summary, verifyKey: payload.verify_key, primarySkuId: payload.primary_sku_id, slug: payload.slug, @@ -51,8 +50,6 @@ export interface DiscordenoApplication { privacyPolicyUrl?: string; /** Partial user object containing info on the owner of the application */ owner?: Partial; - /** If this application is a game sold on Discord, this field will be the summary field for the store page of its primary sku */ - summary: string; /** The hex encoded key for verification in interactions and the GameSDK's GetTicket */ verifyKey: string; /** If the application belongs to a team, this will be a list of the members of that team */ diff --git a/types/applications/application.ts b/types/applications/application.ts index 76618c632..ec0dd235b 100644 --- a/types/applications/application.ts +++ b/types/applications/application.ts @@ -24,8 +24,6 @@ export interface Application { privacyPolicyUrl?: string; /** Partial user object containing info on the owner of the application */ owner?: Partial; - /** If this application is a game sold on Discord, this field will be the summary field for the store page of its primary sku */ - summary: string; /** The hex encoded key for verification in interactions and the GameSDK's GetTicket */ verifyKey: string; /** If the application belongs to a team, this will be a list of the members of that team */ diff --git a/types/messages/editMessage.ts b/types/messages/editMessage.ts index 20d93adf0..c802537af 100644 --- a/types/messages/editMessage.ts +++ b/types/messages/editMessage.ts @@ -23,7 +23,7 @@ export interface EditMessage { users?: bigint[]; }) | null; - /** Attached files to keep */ + /** When specified (adding new attachments), attachments which are not provided in this list will be removed. */ attachments?: Attachment[]; /** The components you would like to have sent in this message */ components?: MessageComponents; diff --git a/util/constants.ts b/util/constants.ts index 379bd023a..5e036c9f6 100644 --- a/util/constants.ts +++ b/util/constants.ts @@ -2,10 +2,10 @@ export const BASE_URL = "https://discord.com/api"; /** https://discord.com/developers/docs/reference#api-versioning-api-versions */ -export const API_VERSION = 9; +export const API_VERSION = 10; /** https://discord.com/developers/docs/topics/gateway#gateways-gateway-versions */ -export const GATEWAY_VERSION = 9; +export const GATEWAY_VERSION = 10; // TODO: update this version /** https://github.com/discordeno/discordeno/releases */