Fix Reddem

This commit is contained in:
Nguyễn Hồng Đức 2022-04-25 20:22:24 +07:00
parent 817aa690ff
commit 4bada5b444
4 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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>

View File

@ -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
View File

@ -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>;