Skip to content
This repository was archived by the owner on Aug 20, 2023. It is now read-only.

Commit c38078c

Browse files
committed
fix: change methods for updated version
1 parent 330a699 commit c38078c

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"ts-node": "^9.0.0",
7171
"typedoc": "^0.19.2",
7272
"typedoc-plugin-nojekyll": "^1.0.1",
73-
"typescript": "^4.0.3"
73+
"typescript": "4.0.5"
7474
},
7575
"engines": {
7676
"node": ">=15.0.1",

src/lib/byters/rest/endpoints/Channel.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@ export class Channel implements Component {
5151
}
5252

5353
public editPermissions(channelID: string, overwriteID: string, data: RESTPutAPIChannelPermissionsJSONBody) {
54-
return this.rest.handler.put(Routes.channelPermissions(channelID, overwriteID), data) as Promise<RESTPutAPIChannelPermissionsResult>;
54+
return this.rest.handler.put(Routes.channelPermission(channelID, overwriteID), data) as Promise<RESTPutAPIChannelPermissionsResult>;
5555
}
5656

5757
public deletePermissions(channelID: string, overwriteID: string) {
58-
return this.rest.handler.delete(Routes.channelPermissions(channelID, overwriteID)) as Promise<RESTDeleteAPIChannelPermissionsResult>;
58+
return this.rest.handler.delete(Routes.channelPermission(channelID, overwriteID)) as Promise<RESTDeleteAPIChannelPermissionsResult>;
5959
}
6060

6161
public getInvites(channelID: string) {
62-
return this.rest.handler.get(Routes.channelInvite(channelID)) as Promise<RESTGetAPIChannelInvitesResult>;
62+
return this.rest.handler.get(Routes.channelInvites(channelID)) as Promise<RESTGetAPIChannelInvitesResult>;
6363
}
6464

6565
public createInvite(channelID: string, data: RESTPostAPIChannelInviteJSONBody) {
66-
return this.rest.handler.post(Routes.channelInvite(channelID), data) as Promise<RESTGetAPIInviteResult>;
66+
return this.rest.handler.post(Routes.channelInvites(channelID), data) as Promise<RESTGetAPIInviteResult>;
6767
}
6868

6969
public triggerTyping(channelID: string) {
@@ -100,7 +100,7 @@ export class Channel implements Component {
100100
}
101101

102102
public crosspost(channelID: string, messageID: string) {
103-
return this.rest.handler.post(Routes.channelCrosspost(channelID, messageID), {}) as Promise<RESTPostAPIChannelMessageCrosspostResult>;
103+
return this.rest.handler.post(Routes.channelMessageCrosspost(channelID, messageID), {}) as Promise<RESTPostAPIChannelMessageCrosspostResult>;
104104
}
105105

106106
public createOwnReaction(channelID: string, messageID: string, emojiID: string) {
@@ -116,11 +116,11 @@ export class Channel implements Component {
116116
}
117117

118118
public getReaction(channelID: string, messageID: string, emojiID: string) {
119-
return this.rest.handler.get(Routes.channelMessageSpecificReaction(channelID, messageID, emojiID)) as Promise<RESTGetAPIChannelMessageReactionsResult>;
119+
return this.rest.handler.get(Routes.channelMessageReaction(channelID, messageID, emojiID)) as Promise<RESTGetAPIChannelMessageReactionsResult>;
120120
}
121121

122122
public deleteReaction(channelID: string, messageID: string, emojiID: string) {
123-
return this.rest.handler.delete(Routes.channelMessageSpecificReaction(channelID, messageID, emojiID)) as Promise<RESTDeleteAPIChannelMessageReactionResult>;
123+
return this.rest.handler.delete(Routes.channelMessageReaction(channelID, messageID, emojiID)) as Promise<RESTDeleteAPIChannelMessageReactionResult>;
124124
}
125125

126126
public deleteReactions(channelID: string, messageID: string) {

src/lib/byters/rest/endpoints/Guild.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class Guild implements Component {
8585
}
8686

8787
public getWidget(guildID: string) {
88-
return this.rest.handler.get(Routes.guildWidget(guildID)) as Promise<RESTGetAPIGuildWidgetResult>;
88+
return this.rest.handler.get(Routes.guildWidgetJSON(guildID)) as Promise<RESTGetAPIGuildWidgetResult>;
8989
}
9090

9191
public updateWidget(guildID: string, data: RESTPatchAPIGuildWidgetSettingsJSONBody) {

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -6100,10 +6100,10 @@ typedoc@^0.19.2:
61006100
shelljs "^0.8.4"
61016101
typedoc-default-themes "^0.11.4"
61026102

6103-
typescript@^4.0.3:
6104-
version "4.1.2"
6105-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.2.tgz#6369ef22516fe5e10304aae5a5c4862db55380e9"
6106-
integrity sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==
6103+
typescript@4.0.5:
6104+
version "4.0.5"
6105+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.5.tgz#ae9dddfd1069f1cb5beb3ef3b2170dd7c1332389"
6106+
integrity sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ==
61076107

61086108
uglify-js@^3.1.4:
61096109
version "3.12.1"

0 commit comments

Comments
 (0)