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