mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com> Co-authored-by: ckohen <chaikohen@gmail.com>
15 lines
314 B
TypeScript
15 lines
314 B
TypeScript
import { DefaultRestOptions } from '../src';
|
|
|
|
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,
|
|
},
|
|
};
|
|
}
|