Files
discord.js/packages/rest/__tests__/util.ts
2022-09-01 20:50:16 +02:00

15 lines
323 B
TypeScript

import { DefaultRestOptions } from '../src/index.js';
export function genPath(path: `/${string}`) {
return `/api/v${DefaultRestOptions.version}${path}` as const;
}
export function jsonHeaders(headers: Record<string, string> = {}) {
return {
headers: {
'content-type': 'application/json',
...headers,
},
};
}