Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: api v10 #331

Merged
merged 14 commits into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deno/
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@ pnpm add discord-api-types
You can only import this module by specifying the API version you want to target. Append `/v*` to the import path, where the `*` represents the API version. Below are some examples

```js
const { APIUser } = require('discord-api-types/v9');
const { APIUser } = require('discord-api-types/v10');
```

```ts
// TypeScript/ES Module support
import { APIUser } from 'discord-api-types/v9';
import { APIUser } from 'discord-api-types/v10';
```

You may also import just certain parts of the module that you need. The possible values are: `globals`, `gateway`, `gateway/v*`, `payloads`, `payloads/v*`, `rest`, `rest/v*`, `rpc`, `rpc/v*`, `utils`, `utils/v*`, `voice`, and `voice/v*`. Below are some examples

```js
const { GatewayVersion } = require('discord-api-types/gateway/v9');
const { GatewayVersion } = require('discord-api-types/gateway/v10');
```

```ts
// TypeScript/ES Module support
import { GatewayVersion } from 'discord-api-types/gateway/v9';
import { GatewayVersion } from 'discord-api-types/gateway/v10';
```

> _**Note:** The `v*` exports (`discord-api-type/v*`) include the appropriate version of `gateway`, `payloads`, `rest`, `rpc`, and `utils` you specified, alongside the `globals` exports_
Expand All @@ -53,21 +53,21 @@ We also provide typings compatible with the [deno](https://deno.land/) runtime.

```ts
// Importing a specific API version
import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/deno/v9.ts';
import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/deno/v10.ts';
```

2. From [deno.land/x](https://deno.land/x)

```ts
// Importing a specific API version
import { APIUser } from 'https://deno.land/x/discord_api_types/v9.ts';
import { APIUser } from 'https://deno.land/x/discord_api_types/v10.ts';
```

3. From [skypack.dev](https://www.skypack.dev/)

```ts
// Importing a specific API version
import { APIUser } from 'https://cdn.skypack.dev/discord-api-types/v9?dts';
import { APIUser } from 'https://cdn.skypack.dev/discord-api-types/v10?dts';
```

## Project Structure
Expand Down
14 changes: 7 additions & 7 deletions deno/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@ pnpm add discord-api-types
You can only import this module by specifying the API version you want to target. Append `/v*` to the import path, where the `*` represents the API version. Below are some examples

```js
const { APIUser } = require('discord-api-types/v9');
const { APIUser } = require('discord-api-types/v10');
```

```ts
// TypeScript/ES Module support
import { APIUser } from 'discord-api-types/v9';
import { APIUser } from 'discord-api-types/v10';
```

You may also import just certain parts of the module that you need. The possible values are: `globals`, `gateway`, `gateway/v*`, `payloads`, `payloads/v*`, `rest`, `rest/v*`, `rpc`, `rpc/v*`, `utils`, `utils/v*`, `voice`, and `voice/v*`. Below are some examples

```js
const { GatewayVersion } = require('discord-api-types/gateway/v9');
const { GatewayVersion } = require('discord-api-types/gateway/v10');
```

```ts
// TypeScript/ES Module support
import { GatewayVersion } from 'discord-api-types/gateway/v9';
import { GatewayVersion } from 'discord-api-types/gateway/v10';
```

> _**Note:** The `v*` exports (`discord-api-type/v*`) include the appropriate version of `gateway`, `payloads`, `rest`, `rpc`, and `utils` you specified, alongside the `globals` exports_
Expand All @@ -53,21 +53,21 @@ We also provide typings compatible with the [deno](https://deno.land/) runtime.

```ts
// Importing a specific API version
import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/deno/v9.ts';
import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/deno/v10.ts';
```

2. From [deno.land/x](https://deno.land/x)

```ts
// Importing a specific API version
import { APIUser } from 'https://deno.land/x/discord_api_types/v9.ts';
import { APIUser } from 'https://deno.land/x/discord_api_types/v10.ts';
```

3. From [skypack.dev](https://www.skypack.dev/)

```ts
// Importing a specific API version
import { APIUser } from 'https://cdn.skypack.dev/discord-api-types/v9?dts';
import { APIUser } from 'https://cdn.skypack.dev/discord-api-types/v10?dts';
```

## Project Structure
Expand Down
2 changes: 1 addition & 1 deletion deno/gateway/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file exports all the types available in the recommended gateway version
// Thereby, things MAY break in the future. Try sticking to imports from a specific version

export * from './v9.ts';
export * from './v10.ts';