Fix Reddem
This commit is contained in:
parent
817aa690ff
commit
4bada5b444
@ -17,9 +17,9 @@ new Client({
|
|||||||
```js
|
```js
|
||||||
client.updateCookie(): Promise<void>
|
client.updateCookie(): Promise<void>
|
||||||
```
|
```
|
||||||
- Reddem Nitro
|
- Redeem Nitro
|
||||||
```js
|
```js
|
||||||
client.reddemNitro('code'): Promise<void>
|
client.redeemNitro('code'): Promise<void>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Sync Status
|
## Sync Status
|
||||||
|
@ -295,7 +295,7 @@ await client.user.setPassword('old password', 'new password');
|
|||||||
await client.user.disableAccount('password');
|
await client.user.disableAccount('password');
|
||||||
// Delete Account [WARNING] Cannot be changed once used!
|
// Delete Account [WARNING] Cannot be changed once used!
|
||||||
await client.user.deleteAccount('password');
|
await client.user.deleteAccount('password');
|
||||||
// Reddem Nitro
|
// Redeem Nitro
|
||||||
await client.reddemNitro('code')
|
await client.redeemNitro('code')
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
@ -377,7 +377,7 @@ class Client extends BaseClient {
|
|||||||
* discordapp.com/gifts/code | discord.gift/code
|
* discordapp.com/gifts/code | discord.gift/code
|
||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
async reddemNitro(nitro) {
|
async redeemNitro(nitro) {
|
||||||
if (typeof nitro !== 'string') throw new Error('INVALID_NITRO');
|
if (typeof nitro !== 'string') throw new Error('INVALID_NITRO');
|
||||||
const regexNitro = /discord(?:(?:app)?\.com\/gifts|\.gift)\/([\w-]{2,255})/gi;
|
const regexNitro = /discord(?:(?:app)?\.com\/gifts|\.gift)\/([\w-]{2,255})/gi;
|
||||||
const code = DataResolver.resolveCode(nitro, regexNitro);
|
const code = DataResolver.resolveCode(nitro, regexNitro);
|
||||||
|
2
typings/index.d.ts
vendored
2
typings/index.d.ts
vendored
@ -582,7 +582,7 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
|
|||||||
public fetchPremiumStickerPacks(): Promise<Collection<Snowflake, StickerPack>>;
|
public fetchPremiumStickerPacks(): Promise<Collection<Snowflake, StickerPack>>;
|
||||||
public fetchWebhook(id: Snowflake, token?: string): Promise<Webhook>;
|
public fetchWebhook(id: Snowflake, token?: string): Promise<Webhook>;
|
||||||
public fetchGuildWidget(guild: GuildResolvable): Promise<Widget>;
|
public fetchGuildWidget(guild: GuildResolvable): Promise<Widget>;
|
||||||
public reddemNitro(code: String<NitroCode>): Promise;
|
public redeemNitro(code: String<NitroCode>): Promise;
|
||||||
public generateInvite(options?: InviteGenerationOptions): string;
|
public generateInvite(options?: InviteGenerationOptions): string;
|
||||||
public login(token?: string): Promise<string>;
|
public login(token?: string): Promise<string>;
|
||||||
public isReady(): this is Client<true>;
|
public isReady(): this is Client<true>;
|
||||||
|
Loading…
Reference in New Issue
Block a user