Skip to content

Commit 2481f9d

Browse files
committed
fix(API-Endpoints): Remove redeclaring client
1 parent 72cb5a5 commit 2481f9d

30 files changed

+0
-212
lines changed

src/API/getAchievements.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
import Achievements from '../Structures/Static/Achievements/Achievements.js';
2-
import Client from '../Client.js';
32
import Endpoint from '../Private/Endpoint.js';
43
import RequestData from '../Private/RequestData.js';
54
import type { RequestOptions } from '../Types/Requests.js';
65

76
class getAchievements extends Endpoint {
8-
override readonly client: Client;
9-
constructor(client: Client) {
10-
super(client);
11-
this.client = client;
12-
}
13-
147
override async execute(options?: RequestOptions): Promise<Achievements | RequestData> {
158
const res = await this.client.requestHandler.request('/resources/achievements', options);
169
if (res.options.raw) return res;

src/API/getActiveHouses.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
import Client from '../Client.js';
21
import Endpoint from '../Private/Endpoint.js';
32
import House from '../Structures/House.js';
43
import RequestData from '../Private/RequestData.js';
54
import type { RequestOptions } from '../Types/Requests.js';
65
import type { WithRaw } from '../Types/API.ts';
76

87
class getActiveHouses extends Endpoint {
9-
override readonly client: Client;
10-
constructor(client: Client) {
11-
super(client);
12-
this.client = client;
13-
}
14-
158
override async execute(options?: RequestOptions): Promise<WithRaw<House[]> | RequestData> {
169
const res = await this.client.requestHandler.request('/housing/active', options);
1710
if (res.options.raw) return res;

src/API/getBoosters.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
import Booster from '../Structures/Boosters/Booster.js';
2-
import Client from '../Client.js';
32
import Endpoint from '../Private/Endpoint.js';
43
import RequestData from '../Private/RequestData.js';
54
import type { RequestOptions } from '../Types/Requests.js';
65
import type { WithRaw } from '../Types/API.ts';
76

87
class getBoosters extends Endpoint {
9-
override readonly client: Client;
10-
constructor(client: Client) {
11-
super(client);
12-
this.client = client;
13-
}
14-
158
override async execute(options?: RequestOptions): Promise<WithRaw<Booster[]> | RequestData> {
169
const res = await this.client.requestHandler.request('/boosters', options);
1710
if (res.options.raw) return res;

src/API/getChallenges.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
import Challenges from '../Structures/Static/Challenges.js';
2-
import Client from '../Client.js';
32
import Endpoint from '../Private/Endpoint.js';
43
import RequestData from '../Private/RequestData.js';
54
import type { RequestOptions } from '../Types/Requests.js';
65

76
class getChallenges extends Endpoint {
8-
override readonly client: Client;
9-
constructor(client: Client) {
10-
super(client);
11-
this.client = client;
12-
}
13-
147
override async execute(options?: RequestOptions): Promise<Challenges | RequestData> {
158
const res = await this.client.requestHandler.request('/resources/challenges', options);
169
if (res.options.raw) return res;

src/API/getGameCounts.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
1-
import Client from '../Client.js';
21
import Endpoint from '../Private/Endpoint.js';
32
import GameCounts from '../Structures/GameCounts.js';
43
import RequestData from '../Private/RequestData.js';
54
import type { RequestOptions } from '../Types/Requests.js';
65

76
class getGameCounts extends Endpoint {
8-
override readonly client: Client;
9-
constructor(client: Client) {
10-
super(client);
11-
this.client = client;
12-
}
13-
147
override async execute(options?: RequestOptions): Promise<GameCounts | RequestData> {
158
const res = await this.client.requestHandler.request('/counts', options);
169
if (res.options.raw) return res;

src/API/getGuild.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import Client from '../Client.js';
21
import Endpoint from '../Private/Endpoint.js';
32
import Errors from '../Errors.ts';
43
import Guild from '../Structures/Guild/Guild.js';
@@ -7,12 +6,6 @@ import type { GuildFetchOptions } from '../Types/API.js';
76
import type { RequestOptions } from '../Types/Requests.js';
87

98
class getGuild extends Endpoint {
10-
override readonly client: Client;
11-
constructor(client: Client) {
12-
super(client);
13-
this.client = client;
14-
}
15-
169
override async execute(
1710
searchParameter: GuildFetchOptions,
1811
query: string,

src/API/getGuildAchievements.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
1-
import Client from '../Client.js';
21
import Endpoint from '../Private/Endpoint.js';
32
import GuildAchievements from '../Structures/Static/Achievements/GuildAchievements.js';
43
import RequestData from '../Private/RequestData.js';
54
import type { RequestOptions } from '../Types/Requests.js';
65

76
class getGuildAchievements extends Endpoint {
8-
override readonly client: Client;
9-
constructor(client: Client) {
10-
super(client);
11-
this.client = client;
12-
}
13-
147
override async execute(options?: RequestOptions): Promise<GuildAchievements | RequestData> {
158
const res = await this.client.requestHandler.request('/resources/guilds/achievements', options);
169
if (res.options.raw) return res;

src/API/getHouse.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
import Client from '../Client.js';
21
import Endpoint from '../Private/Endpoint.js';
32
import Errors from '../Errors.ts';
43
import House from '../Structures/House.js';
54
import RequestData from '../Private/RequestData.js';
65
import type { RequestOptions } from '../Types/Requests.js';
76

87
class getHouse extends Endpoint {
9-
override readonly client: Client;
10-
constructor(client: Client) {
11-
super(client);
12-
this.client = client;
13-
}
14-
158
override async execute(query: string, options?: RequestOptions): Promise<House | RequestData> {
169
if (!query) throw new Error(Errors.NO_UUID);
1710
const res = await this.client.requestHandler.request(`/housing/house?house=${query}`, options);

src/API/getLeaderboards.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import Client from '../Client.js';
21
import Endpoint from '../Private/Endpoint.js';
32
import Errors from '../Errors.ts';
43
import Leaderboard from '../Structures/Leaderboard.js';
@@ -7,12 +6,6 @@ import type { RequestOptions } from '../Types/Requests.js';
76
import type { WithRaw } from '../Types/API.ts';
87

98
class getLeaderboards extends Endpoint {
10-
override readonly client: Client;
11-
constructor(client: Client) {
12-
super(client);
13-
this.client = client;
14-
}
15-
169
override async execute(options?: RequestOptions): Promise<WithRaw<Record<string, Leaderboard[]>> | RequestData> {
1710
const res = await this.client.requestHandler.request('/leaderboards', options);
1811
if (res.options.raw) return res;

src/API/getPlayer.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import Client from '../Client.js';
21
import Endpoint from '../Private/Endpoint.js';
32
import Errors from '../Errors.ts';
43
import Guild from '../Structures/Guild/Guild.js';
@@ -9,12 +8,6 @@ import RequestData from '../Private/RequestData.js';
98
import type { PlayerRequestOptions } from '../Types/API.js';
109

1110
class getPlayer extends Endpoint {
12-
override readonly client: Client;
13-
constructor(client: Client) {
14-
super(client);
15-
this.client = client;
16-
}
17-
1811
override async execute(query: string, options?: PlayerRequestOptions): Promise<Player | RequestData> {
1912
if (!query) throw new Error(Errors.NO_NICKNAME_UUID);
2013
query = await this.client.requestHandler.toUUID(query);

0 commit comments

Comments
 (0)