seyfert 2.2.1-dev-13331323582.0 → 2.2.1-dev-13340711253.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/Routes/applications.d.ts +6 -1
- package/lib/cache/resources/emojis.d.ts +8 -7
- package/lib/cache/resources/emojis.js +17 -3
- package/lib/client/client.d.ts +2 -0
- package/lib/client/client.js +6 -0
- package/lib/client/transformers.d.ts +8 -1
- package/lib/client/transformers.js +10 -0
- package/lib/client/workerclient.d.ts +2 -0
- package/lib/client/workerclient.js +6 -0
- package/lib/common/shorters/application.d.ts +26 -18
- package/lib/common/shorters/application.js +64 -24
- package/lib/common/shorters/bans.js +4 -6
- package/lib/common/shorters/channels.js +7 -6
- package/lib/common/shorters/emojis.js +6 -9
- package/lib/common/types/resolvables.d.ts +5 -2
- package/lib/structures/Application.d.ts +43 -0
- package/lib/structures/Application.js +51 -0
- package/lib/structures/ClientUser.d.ts +30 -2
- package/lib/structures/ClientUser.js +30 -3
- package/lib/structures/{GuildEmoji.d.ts → Emoji.d.ts} +24 -12
- package/lib/structures/{GuildEmoji.js → Emoji.js} +40 -16
- package/lib/structures/Entitlement.js +1 -1
- package/lib/structures/Guild.js +2 -2
- package/lib/structures/extra/BaseGuild.d.ts +4 -0
- package/lib/structures/extra/BaseGuild.js +9 -6
- package/lib/structures/index.d.ts +1 -1
- package/lib/structures/index.js +1 -1
- package/lib/types/payloads/application.d.ts +31 -1
- package/lib/types/payloads/application.js +9 -1
- package/lib/types/rest/application.d.ts +9 -5
- package/package.json +1 -1
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import type { RESTDeleteAPIApplicationEmojiResult, RESTGetAPIApplicationCommandResult, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTGetAPIApplicationEmojiResult, RESTGetAPIApplicationEmojisResult, RESTGetAPIApplicationGuildCommandResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTGetAPIEntitlementResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTGetAPISKUsResult, RESTPatchAPIApplicationCommandJSONBody, RESTPatchAPIApplicationCommandResult, RESTPatchAPIApplicationEmojiJSONBody, RESTPatchAPIApplicationEmojiResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPostAPIApplicationCommandsJSONBody, RESTPostAPIApplicationCommandsResult, RESTPostAPIApplicationEmojiJSONBody, RESTPostAPIApplicationEmojiResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTPostAPIEntitlementBody, RESTPostAPIEntitlementResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTPutAPIGuildApplicationCommandsPermissionsResult } from '../../types';
|
|
1
|
+
import type { RESTDeleteAPIApplicationEmojiResult, RESTGetAPIApplicationCommandResult, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTGetAPIApplicationEmojiResult, RESTGetAPIApplicationEmojisResult, RESTGetAPIApplicationGuildCommandResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTGetAPIEntitlementResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTGetAPISKUsResult, RESTGetCurrentApplicationResult, RESTPatchAPIApplicationCommandJSONBody, RESTPatchAPIApplicationCommandResult, RESTPatchAPIApplicationEmojiJSONBody, RESTPatchAPIApplicationEmojiResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPatchCurrentApplicationJSONBody, RESTPatchCurrentApplicationResult, RESTPostAPIApplicationCommandsJSONBody, RESTPostAPIApplicationCommandsResult, RESTPostAPIApplicationEmojiJSONBody, RESTPostAPIApplicationEmojiResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTPostAPIEntitlementBody, RESTPostAPIEntitlementResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTPutAPIGuildApplicationCommandsPermissionsResult, RestGetAPIApplicationActivityInstanceResult } from '../../types';
|
|
2
2
|
import type { RestArguments, RestArgumentsNoBody } from '../api';
|
|
3
3
|
export interface ApplicationRoutes {
|
|
4
4
|
applications: (id: string) => {
|
|
5
|
+
get(args?: RestArgumentsNoBody): Promise<RESTGetCurrentApplicationResult>;
|
|
6
|
+
patch(args: RestArguments<RESTPatchCurrentApplicationJSONBody>): Promise<RESTPatchCurrentApplicationResult>;
|
|
7
|
+
'activity-instances': (id: string) => {
|
|
8
|
+
get(args?: RestArgumentsNoBody): Promise<RestGetAPIApplicationActivityInstanceResult>;
|
|
9
|
+
};
|
|
5
10
|
guilds: (id: string) => {
|
|
6
11
|
commands: {
|
|
7
12
|
get(args?: RestArgumentsNoBody<RESTGetAPIApplicationGuildCommandsQuery>): Promise<RESTGetAPIApplicationGuildCommandsResult>;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import type { CacheFrom, ReturnCache } from '../..';
|
|
1
|
+
import type { ApplicationEmojiStructure, CacheFrom, ReturnCache } from '../..';
|
|
2
2
|
import { type GuildEmojiStructure } from '../../client/transformers';
|
|
3
|
-
import type { APIEmoji } from '../../types';
|
|
3
|
+
import type { APIApplicationEmoji, APIEmoji } from '../../types';
|
|
4
4
|
import { GuildRelatedResource } from './default/guild-related';
|
|
5
|
-
export declare class Emojis extends GuildRelatedResource<any, APIEmoji> {
|
|
5
|
+
export declare class Emojis extends GuildRelatedResource<any, APIEmoji | APIApplicationEmoji> {
|
|
6
6
|
namespace: string;
|
|
7
7
|
filter(data: APIEmoji, id: string, guild_id: string, from: CacheFrom): boolean;
|
|
8
|
-
get(id: string): ReturnCache<GuildEmojiStructure | undefined>;
|
|
8
|
+
get(id: string): ReturnCache<GuildEmojiStructure | ApplicationEmojiStructure | undefined>;
|
|
9
9
|
raw(id: string): ReturnCache<APIEmoji | undefined>;
|
|
10
|
-
bulk(ids: string[]): ReturnCache<GuildEmojiStructure[]>;
|
|
10
|
+
bulk(ids: string[]): ReturnCache<(GuildEmojiStructure | ApplicationEmojiStructure)[]>;
|
|
11
11
|
bulkRaw(ids: string[]): ReturnCache<(APIEmoji & {
|
|
12
12
|
id: string;
|
|
13
13
|
guild_id: string;
|
|
14
14
|
})[]>;
|
|
15
|
-
values(guild: string): ReturnCache<GuildEmojiStructure[]>;
|
|
16
|
-
valuesRaw(guild: string): ReturnCache<(APIEmoji & {
|
|
15
|
+
values(guild: string): ReturnCache<(GuildEmojiStructure | ApplicationEmojiStructure)[]>;
|
|
16
|
+
valuesRaw(guild: string): ReturnCache<(((APIEmoji & {
|
|
17
17
|
id: string;
|
|
18
|
+
}) | APIApplicationEmoji) & {
|
|
18
19
|
guild_id: string;
|
|
19
20
|
})[]>;
|
|
20
21
|
}
|
|
@@ -11,19 +11,33 @@ class Emojis extends guild_related_1.GuildRelatedResource {
|
|
|
11
11
|
return true;
|
|
12
12
|
}
|
|
13
13
|
get(id) {
|
|
14
|
-
return (0, common_1.fakePromise)(super.get(id)).then(rawEmoji =>
|
|
14
|
+
return (0, common_1.fakePromise)(super.get(id)).then(rawEmoji => {
|
|
15
|
+
if (!rawEmoji)
|
|
16
|
+
return undefined;
|
|
17
|
+
if (rawEmoji.guild_id === this.client.applicationId)
|
|
18
|
+
return transformers_1.Transformers.ApplicationEmoji(this.client, rawEmoji);
|
|
19
|
+
return transformers_1.Transformers.GuildEmoji(this.client, rawEmoji, rawEmoji.guild_id);
|
|
20
|
+
});
|
|
15
21
|
}
|
|
16
22
|
raw(id) {
|
|
17
23
|
return super.get(id);
|
|
18
24
|
}
|
|
19
25
|
bulk(ids) {
|
|
20
|
-
return (0, common_1.fakePromise)(super.bulk(ids)).then(emojis => emojis.map(rawEmoji =>
|
|
26
|
+
return (0, common_1.fakePromise)(super.bulk(ids)).then(emojis => emojis.map(rawEmoji => {
|
|
27
|
+
if (rawEmoji.guild_id === this.client.applicationId)
|
|
28
|
+
return transformers_1.Transformers.ApplicationEmoji(this.client, rawEmoji);
|
|
29
|
+
return transformers_1.Transformers.GuildEmoji(this.client, rawEmoji, rawEmoji.guild_id);
|
|
30
|
+
}));
|
|
21
31
|
}
|
|
22
32
|
bulkRaw(ids) {
|
|
23
33
|
return super.bulk(ids);
|
|
24
34
|
}
|
|
25
35
|
values(guild) {
|
|
26
|
-
return (0, common_1.fakePromise)(super.values(guild)).then(emojis => emojis.map(rawEmoji =>
|
|
36
|
+
return (0, common_1.fakePromise)(super.values(guild)).then(emojis => emojis.map(rawEmoji => {
|
|
37
|
+
if (rawEmoji.guild_id === this.client.applicationId)
|
|
38
|
+
return transformers_1.Transformers.ApplicationEmoji(this.client, rawEmoji);
|
|
39
|
+
return transformers_1.Transformers.GuildEmoji(this.client, rawEmoji, rawEmoji.guild_id);
|
|
40
|
+
}));
|
|
27
41
|
}
|
|
28
42
|
valuesRaw(guild) {
|
|
29
43
|
return super.values(guild);
|
package/lib/client/client.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export declare class Client<Ready extends boolean = boolean> extends BaseClient
|
|
|
20
20
|
collectors: Collectors;
|
|
21
21
|
events: EventHandler;
|
|
22
22
|
constructor(options?: ClientOptions);
|
|
23
|
+
get applicationId(): string;
|
|
24
|
+
set applicationId(id: string);
|
|
23
25
|
setServices({ gateway, ...rest }: ServicesOptions & {
|
|
24
26
|
gateway?: ShardManager;
|
|
25
27
|
}): void;
|
package/lib/client/client.js
CHANGED
|
@@ -20,6 +20,12 @@ class Client extends base_1.BaseClient {
|
|
|
20
20
|
constructor(options) {
|
|
21
21
|
super(options);
|
|
22
22
|
}
|
|
23
|
+
get applicationId() {
|
|
24
|
+
return this.me?.application.id ?? super.applicationId;
|
|
25
|
+
}
|
|
26
|
+
set applicationId(id) {
|
|
27
|
+
super.applicationId = id;
|
|
28
|
+
}
|
|
23
29
|
setServices({ gateway, ...rest }) {
|
|
24
30
|
super.setServices(rest);
|
|
25
31
|
if (gateway) {
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { type CustomStructures, OptionResolver } from '../commands';
|
|
2
2
|
import type { StructStates } from '../common/';
|
|
3
|
-
import { AnonymousGuild, AutoModerationRule, BaseChannel, BaseGuildChannel, CategoryChannel, ClientUser, DMChannel, DirectoryChannel, Entitlement, ForumChannel, Guild, GuildBan, GuildEmoji, GuildMember, GuildRole, GuildTemplate, InteractionGuildMember, MediaChannel, Message, NewsChannel, Poll, StageChannel, Sticker, TextGuildChannel, ThreadChannel, User, VoiceChannel, VoiceState, Webhook, WebhookMessage } from '../structures';
|
|
3
|
+
import { AnonymousGuild, ApplicationEmoji, AutoModerationRule, BaseChannel, BaseGuildChannel, CategoryChannel, ClientUser, DMChannel, DirectoryChannel, Emoji, Entitlement, ForumChannel, Guild, GuildBan, GuildEmoji, GuildMember, GuildRole, GuildTemplate, InteractionGuildMember, MediaChannel, Message, NewsChannel, Poll, StageChannel, Sticker, TextGuildChannel, ThreadChannel, User, VoiceChannel, VoiceState, Webhook, WebhookMessage } from '../structures';
|
|
4
|
+
import { Application } from '../structures/Application';
|
|
4
5
|
import type { ChannelType } from '../types';
|
|
5
6
|
export type PollStructure = InferCustomStructure<Poll, 'Poll'>;
|
|
6
7
|
export type ClientUserStructure = InferCustomStructure<ClientUser, 'ClientUser'>;
|
|
8
|
+
export type ApplicationStructure = InferCustomStructure<Application, 'Application'>;
|
|
9
|
+
export type ApplicationEmojiStructure = InferCustomStructure<ApplicationEmoji, 'ApplicationEmoji'>;
|
|
7
10
|
export type AnonymousGuildStructure = InferCustomStructure<AnonymousGuild, 'AnonymousGuild'>;
|
|
8
11
|
export type AutoModerationRuleStructure = InferCustomStructure<AutoModerationRule, 'AutoModerationRule'>;
|
|
9
12
|
export type BaseChannelStructure = InferCustomStructure<BaseChannel<ChannelType>, 'BaseChannel'>;
|
|
@@ -20,6 +23,7 @@ export type NewsChannelStructure = InferCustomStructure<NewsChannel, 'NewsChanne
|
|
|
20
23
|
export type DirectoryChannelStructure = InferCustomStructure<DirectoryChannel, 'DirectoryChannel'>;
|
|
21
24
|
export type GuildStructure<State extends StructStates = 'api'> = InferCustomStructure<Guild<State>, 'Guild'>;
|
|
22
25
|
export type GuildBanStructure = InferCustomStructure<GuildBan, 'GuildBan'>;
|
|
26
|
+
export type EmojiStructure = InferCustomStructure<Emoji, 'Emoji'>;
|
|
23
27
|
export type GuildEmojiStructure = InferCustomStructure<GuildEmoji, 'GuildEmoji'>;
|
|
24
28
|
export type GuildMemberStructure = InferCustomStructure<GuildMember, 'GuildMember'>;
|
|
25
29
|
export type InteractionGuildMemberStructure = InferCustomStructure<InteractionGuildMember, 'InteractionGuildMember'>;
|
|
@@ -34,6 +38,8 @@ export type WebhookStructure = InferCustomStructure<Webhook, 'Webhook'>;
|
|
|
34
38
|
export type OptionResolverStructure = InferCustomStructure<OptionResolver, 'OptionResolver'>;
|
|
35
39
|
export type EntitlementStructure = InferCustomStructure<Entitlement, 'Entitlement'>;
|
|
36
40
|
export declare const Transformers: {
|
|
41
|
+
Application(client: import("../commands").UsingClient, data: import("../types").APIApplication): ApplicationStructure;
|
|
42
|
+
ApplicationEmoji(client: import("../commands").UsingClient, data: import("../types").APIApplicationEmoji): ApplicationEmojiStructure;
|
|
37
43
|
AnonymousGuild(client: import("../commands").UsingClient, data: import("../types").APIPartialGuild): AnonymousGuildStructure;
|
|
38
44
|
AutoModerationRule(client: import("../commands").UsingClient, data: import("../types").APIAutoModerationRule): AutoModerationRuleStructure;
|
|
39
45
|
BaseChannel(client: import("../commands").UsingClient, data: import("../types").APIChannelBase<ChannelType>): BaseChannelStructure;
|
|
@@ -51,6 +57,7 @@ export declare const Transformers: {
|
|
|
51
57
|
ClientUser(client: import("../commands").UsingClient, data: import("../types").APIUser, application: Pick<import("../types").APIApplication, "id" | "flags">): ClientUserStructure;
|
|
52
58
|
Guild<State extends StructStates = "api">(client: import("../commands").UsingClient, data: import("../types").APIGuild | import("../types").GatewayGuildCreateDispatchData): GuildStructure<State>;
|
|
53
59
|
GuildBan(client: import("../commands").UsingClient, data: import("../types").APIBan, guildId: string): GuildBanStructure;
|
|
60
|
+
Emoji(client: import("../commands").UsingClient, data: import("../types").APIEmoji): EmojiStructure;
|
|
54
61
|
GuildEmoji(client: import("../commands").UsingClient, data: import("../types").APIEmoji, guildId: string): GuildEmojiStructure;
|
|
55
62
|
GuildMember(client: import("../commands").UsingClient, data: import("../structures").GuildMemberData, user: import("../types").APIUser, guildId: string): GuildMemberStructure;
|
|
56
63
|
InteractionGuildMember(client: import("../commands").UsingClient, data: import("../types").APIInteractionDataResolvedGuildMember, user: import("../types").APIUser, guildId: string): InteractionGuildMemberStructure;
|
|
@@ -3,7 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Transformers = void 0;
|
|
4
4
|
const commands_1 = require("../commands");
|
|
5
5
|
const structures_1 = require("../structures");
|
|
6
|
+
const Application_1 = require("../structures/Application");
|
|
6
7
|
exports.Transformers = {
|
|
8
|
+
Application(...args) {
|
|
9
|
+
return new Application_1.Application(...args);
|
|
10
|
+
},
|
|
11
|
+
ApplicationEmoji(...args) {
|
|
12
|
+
return new structures_1.ApplicationEmoji(...args);
|
|
13
|
+
},
|
|
7
14
|
AnonymousGuild(...args) {
|
|
8
15
|
return new structures_1.AnonymousGuild(...args);
|
|
9
16
|
},
|
|
@@ -55,6 +62,9 @@ exports.Transformers = {
|
|
|
55
62
|
GuildBan(...args) {
|
|
56
63
|
return new structures_1.GuildBan(...args);
|
|
57
64
|
},
|
|
65
|
+
Emoji(...args) {
|
|
66
|
+
return new structures_1.Emoji(...args);
|
|
67
|
+
},
|
|
58
68
|
GuildEmoji(...args) {
|
|
59
69
|
return new structures_1.GuildEmoji(...args);
|
|
60
70
|
},
|
|
@@ -28,6 +28,8 @@ export declare class WorkerClient<Ready extends boolean = boolean> extends BaseC
|
|
|
28
28
|
constructor(options?: WorkerClientOptions);
|
|
29
29
|
get workerId(): number;
|
|
30
30
|
get latency(): number;
|
|
31
|
+
get applicationId(): string;
|
|
32
|
+
set applicationId(id: string);
|
|
31
33
|
setServices(rest: ServicesOptions): void;
|
|
32
34
|
setWorkerData(data: WorkerData): void;
|
|
33
35
|
get workerData(): WorkerData;
|
|
@@ -65,6 +65,12 @@ class WorkerClient extends base_1.BaseClient {
|
|
|
65
65
|
this.shards.forEach(s => (acc += s.latency));
|
|
66
66
|
return acc / this.shards.size;
|
|
67
67
|
}
|
|
68
|
+
get applicationId() {
|
|
69
|
+
return this.me?.application.id ?? super.applicationId;
|
|
70
|
+
}
|
|
71
|
+
set applicationId(id) {
|
|
72
|
+
super.applicationId = id;
|
|
73
|
+
}
|
|
68
74
|
setServices(rest) {
|
|
69
75
|
super.setServices(rest);
|
|
70
76
|
if (this.options.postMessage && rest.cache?.adapter instanceof cache_1.WorkerAdapter) {
|
|
@@ -1,56 +1,64 @@
|
|
|
1
|
-
import { type EntitlementStructure } from '../../client';
|
|
2
|
-
import type { RESTGetAPIEntitlementsQuery,
|
|
1
|
+
import { type ApplicationEmojiStructure, type ApplicationStructure, type EntitlementStructure } from '../../client';
|
|
2
|
+
import type { RESTGetAPIEntitlementsQuery, RESTPatchAPIApplicationEmojiJSONBody, RESTPatchCurrentApplicationJSONBody, RESTPostAPIEntitlementBody } from '../../types';
|
|
3
|
+
import type { ApplicationEmojiResolvable } from '../types/resolvables';
|
|
3
4
|
import { BaseShorter } from './base';
|
|
4
5
|
export declare class ApplicationShorter extends BaseShorter {
|
|
5
6
|
/**
|
|
6
7
|
* Lists the emojis for the application.
|
|
7
|
-
* @param applicationId The ID of the application.
|
|
8
8
|
* @returns The emojis.
|
|
9
9
|
*/
|
|
10
|
-
listEmojis(
|
|
10
|
+
listEmojis(force?: boolean): Promise<ApplicationEmojiStructure[]>;
|
|
11
11
|
/**
|
|
12
12
|
* Gets an emoji for the application.
|
|
13
|
-
* @param applicationId The ID of the application.
|
|
14
13
|
* @param emojiId The ID of the emoji.
|
|
15
14
|
* @returns The emoji.
|
|
16
15
|
*/
|
|
17
|
-
getEmoji(
|
|
16
|
+
getEmoji(emojiId: string, force?: boolean): Promise<ApplicationEmojiStructure>;
|
|
18
17
|
/**
|
|
19
18
|
* Creates a new emoji for the application.
|
|
20
|
-
* @param applicationId The ID of the application.
|
|
21
19
|
* @param body.name The name of the emoji.
|
|
22
20
|
* @param body.image The [image data string](https://discord.com/developers/docs/reference#image-data) of the emoji.
|
|
23
21
|
* @returns The created emoji.
|
|
24
22
|
*/
|
|
25
|
-
createEmoji(
|
|
23
|
+
createEmoji(raw: ApplicationEmojiResolvable): Promise<ApplicationEmojiStructure>;
|
|
24
|
+
/**
|
|
25
|
+
* Edits an emoji for the application.
|
|
26
|
+
* @param emojiId The ID of the emoji.
|
|
27
|
+
* @param body.name The new name of the emoji.
|
|
28
|
+
* @returns The edited emoji.
|
|
29
|
+
*/
|
|
30
|
+
editEmoji(emojiId: string, body: RESTPatchAPIApplicationEmojiJSONBody): Promise<ApplicationEmojiStructure>;
|
|
31
|
+
/**
|
|
32
|
+
* Deletes an emoji for the application.
|
|
33
|
+
* @param emojiId The ID of the emoji.
|
|
34
|
+
*/
|
|
35
|
+
deleteEmoji(emojiId: string): Promise<never>;
|
|
26
36
|
/**
|
|
27
37
|
* Lists the entitlements for the application.
|
|
28
|
-
* @param applicationId The ID of the application.
|
|
29
38
|
* @param [query] The query parameters.
|
|
30
39
|
*/
|
|
31
|
-
listEntitlements(
|
|
40
|
+
listEntitlements(query?: RESTGetAPIEntitlementsQuery): Promise<EntitlementStructure[]>;
|
|
32
41
|
/**
|
|
33
42
|
* Consumes an entitlement for the application.
|
|
34
|
-
* @param applicationId The ID of the application.
|
|
35
43
|
* @param entitlementId The ID of the entitlement.
|
|
36
44
|
*/
|
|
37
|
-
consumeEntitlement(
|
|
45
|
+
consumeEntitlement(entitlementId: string): Promise<never>;
|
|
38
46
|
/**
|
|
39
47
|
* Creates a test entitlement for the application.
|
|
40
|
-
* @param applicationId The ID of the application.
|
|
41
48
|
* @param body The body of the request.
|
|
42
49
|
*/
|
|
43
|
-
createTestEntitlement(
|
|
50
|
+
createTestEntitlement(body: RESTPostAPIEntitlementBody): Promise<EntitlementStructure>;
|
|
44
51
|
/**
|
|
45
52
|
* Deletes a test entitlement for the application.
|
|
46
|
-
* @param applicationId The ID of the application.
|
|
47
53
|
* @param entitlementId The ID of the entitlement.
|
|
48
54
|
*/
|
|
49
|
-
deleteTestEntitlement(
|
|
55
|
+
deleteTestEntitlement(entitlementId: string): Promise<never>;
|
|
50
56
|
/**
|
|
51
57
|
* Lists the SKUs for the application.
|
|
52
|
-
* @param applicationId The ID of the application.
|
|
53
58
|
* @returns The SKUs.
|
|
54
59
|
*/
|
|
55
|
-
listSKUs(
|
|
60
|
+
listSKUs(): Promise<import("../../types").RESTGetAPISKUsResult>;
|
|
61
|
+
fetch(): Promise<ApplicationStructure>;
|
|
62
|
+
edit(body: RESTPatchCurrentApplicationJSONBody): Promise<ApplicationStructure>;
|
|
63
|
+
getActivityInstance(instanceId: string): Promise<import("../../types").RestGetAPIApplicationActivityInstanceResult>;
|
|
56
64
|
}
|
|
@@ -1,81 +1,121 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ApplicationShorter = void 0;
|
|
4
|
+
const __1 = require("../..");
|
|
4
5
|
const client_1 = require("../../client");
|
|
5
6
|
const base_1 = require("./base");
|
|
6
7
|
class ApplicationShorter extends base_1.BaseShorter {
|
|
7
8
|
/**
|
|
8
9
|
* Lists the emojis for the application.
|
|
9
|
-
* @param applicationId The ID of the application.
|
|
10
10
|
* @returns The emojis.
|
|
11
11
|
*/
|
|
12
|
-
listEmojis(
|
|
13
|
-
|
|
12
|
+
async listEmojis(force = false) {
|
|
13
|
+
if (!force) {
|
|
14
|
+
const cached = (await this.client.cache.emojis?.values(this.client.applicationId));
|
|
15
|
+
if (cached?.length)
|
|
16
|
+
return cached;
|
|
17
|
+
}
|
|
18
|
+
const data = await this.client.proxy.applications(this.client.applicationId).emojis.get();
|
|
19
|
+
await this.client.cache.emojis?.set(__1.CacheFrom.Rest, data.items.map(e => [e.id, e]), this.client.applicationId);
|
|
20
|
+
return data.items.map(e => client_1.Transformers.ApplicationEmoji(this.client, e));
|
|
14
21
|
}
|
|
15
22
|
/**
|
|
16
23
|
* Gets an emoji for the application.
|
|
17
|
-
* @param applicationId The ID of the application.
|
|
18
24
|
* @param emojiId The ID of the emoji.
|
|
19
25
|
* @returns The emoji.
|
|
20
26
|
*/
|
|
21
|
-
getEmoji(
|
|
22
|
-
|
|
27
|
+
async getEmoji(emojiId, force = false) {
|
|
28
|
+
if (!force) {
|
|
29
|
+
const cached = (await this.client.cache.emojis?.get(emojiId));
|
|
30
|
+
if (cached)
|
|
31
|
+
return cached;
|
|
32
|
+
}
|
|
33
|
+
const data = await this.client.proxy.applications(this.client.applicationId).emojis(emojiId).get();
|
|
34
|
+
await this.client.cache.emojis?.set(__1.CacheFrom.Rest, data.id, this.client.applicationId, data);
|
|
35
|
+
return client_1.Transformers.ApplicationEmoji(this.client, data);
|
|
23
36
|
}
|
|
24
37
|
/**
|
|
25
38
|
* Creates a new emoji for the application.
|
|
26
|
-
* @param applicationId The ID of the application.
|
|
27
39
|
* @param body.name The name of the emoji.
|
|
28
40
|
* @param body.image The [image data string](https://discord.com/developers/docs/reference#image-data) of the emoji.
|
|
29
41
|
* @returns The created emoji.
|
|
30
42
|
*/
|
|
31
|
-
createEmoji(
|
|
32
|
-
|
|
43
|
+
async createEmoji(raw) {
|
|
44
|
+
const data = await this.client.proxy
|
|
45
|
+
.applications(this.client.applicationId)
|
|
46
|
+
.emojis.post({ body: { ...raw, image: await (0, __1.resolveImage)(raw.image) } });
|
|
47
|
+
await this.client.cache.emojis?.set(__1.CacheFrom.Rest, data.id, this.client.applicationId, data);
|
|
48
|
+
return client_1.Transformers.ApplicationEmoji(this.client, data);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Edits an emoji for the application.
|
|
52
|
+
* @param emojiId The ID of the emoji.
|
|
53
|
+
* @param body.name The new name of the emoji.
|
|
54
|
+
* @returns The edited emoji.
|
|
55
|
+
*/
|
|
56
|
+
async editEmoji(emojiId, body) {
|
|
57
|
+
const data = await this.client.proxy.applications(this.client.applicationId).emojis(emojiId).patch({ body });
|
|
58
|
+
await this.client.cache.emojis?.patch(__1.CacheFrom.Rest, emojiId, this.client.applicationId, data);
|
|
59
|
+
return client_1.Transformers.ApplicationEmoji(this.client, data);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Deletes an emoji for the application.
|
|
63
|
+
* @param emojiId The ID of the emoji.
|
|
64
|
+
*/
|
|
65
|
+
deleteEmoji(emojiId) {
|
|
66
|
+
return this.client.proxy.applications(this.client.applicationId).emojis(emojiId).delete();
|
|
33
67
|
}
|
|
34
68
|
/**
|
|
35
69
|
* Lists the entitlements for the application.
|
|
36
|
-
* @param applicationId The ID of the application.
|
|
37
70
|
* @param [query] The query parameters.
|
|
38
71
|
*/
|
|
39
|
-
listEntitlements(
|
|
72
|
+
listEntitlements(query) {
|
|
40
73
|
return this.client.proxy
|
|
41
|
-
.applications(applicationId)
|
|
74
|
+
.applications(this.client.applicationId)
|
|
42
75
|
.entitlements.get({ query })
|
|
43
76
|
.then(et => et.map(e => client_1.Transformers.Entitlement(this.client, e)));
|
|
44
77
|
}
|
|
45
78
|
/**
|
|
46
79
|
* Consumes an entitlement for the application.
|
|
47
|
-
* @param applicationId The ID of the application.
|
|
48
80
|
* @param entitlementId The ID of the entitlement.
|
|
49
81
|
*/
|
|
50
|
-
consumeEntitlement(
|
|
51
|
-
return this.client.proxy.applications(applicationId).entitlements(entitlementId).consume.post();
|
|
82
|
+
consumeEntitlement(entitlementId) {
|
|
83
|
+
return this.client.proxy.applications(this.client.applicationId).entitlements(entitlementId).consume.post();
|
|
52
84
|
}
|
|
53
85
|
/**
|
|
54
86
|
* Creates a test entitlement for the application.
|
|
55
|
-
* @param applicationId The ID of the application.
|
|
56
87
|
* @param body The body of the request.
|
|
57
88
|
*/
|
|
58
|
-
createTestEntitlement(
|
|
89
|
+
createTestEntitlement(body) {
|
|
59
90
|
return this.client.proxy
|
|
60
|
-
.applications(applicationId)
|
|
91
|
+
.applications(this.client.applicationId)
|
|
61
92
|
.entitlements.post({ body })
|
|
62
93
|
.then(et => client_1.Transformers.Entitlement(this.client, et));
|
|
63
94
|
}
|
|
64
95
|
/**
|
|
65
96
|
* Deletes a test entitlement for the application.
|
|
66
|
-
* @param applicationId The ID of the application.
|
|
67
97
|
* @param entitlementId The ID of the entitlement.
|
|
68
98
|
*/
|
|
69
|
-
deleteTestEntitlement(
|
|
70
|
-
return this.client.proxy.applications(applicationId).entitlements(entitlementId).delete();
|
|
99
|
+
deleteTestEntitlement(entitlementId) {
|
|
100
|
+
return this.client.proxy.applications(this.client.applicationId).entitlements(entitlementId).delete();
|
|
71
101
|
}
|
|
72
102
|
/**
|
|
73
103
|
* Lists the SKUs for the application.
|
|
74
|
-
* @param applicationId The ID of the application.
|
|
75
104
|
* @returns The SKUs.
|
|
76
105
|
*/
|
|
77
|
-
listSKUs(
|
|
78
|
-
return this.client.proxy.applications(applicationId).skus.get();
|
|
106
|
+
listSKUs() {
|
|
107
|
+
return this.client.proxy.applications(this.client.applicationId).skus.get();
|
|
108
|
+
}
|
|
109
|
+
async fetch() {
|
|
110
|
+
const data = await this.client.proxy.applications('@me').get();
|
|
111
|
+
return client_1.Transformers.Application(this.client, data);
|
|
112
|
+
}
|
|
113
|
+
async edit(body) {
|
|
114
|
+
const data = await this.client.proxy.applications('@me').patch({ body });
|
|
115
|
+
return client_1.Transformers.Application(this.client, data);
|
|
116
|
+
}
|
|
117
|
+
getActivityInstance(instanceId) {
|
|
118
|
+
return this.client.proxy.applications(this.client.applicationId)['activity-instances'](instanceId).get();
|
|
79
119
|
}
|
|
80
120
|
}
|
|
81
121
|
exports.ApplicationShorter = ApplicationShorter;
|
|
@@ -13,8 +13,7 @@ class BanShorter extends base_1.BaseShorter {
|
|
|
13
13
|
*/
|
|
14
14
|
async bulkCreate(guildId, body, reason) {
|
|
15
15
|
const bans = await this.client.proxy.guilds(guildId)['bulk-bans'].post({ reason, body });
|
|
16
|
-
|
|
17
|
-
this.client.cache.members?.removeIfNI('GuildModeration', id, guildId);
|
|
16
|
+
await Promise.all(bans.banned_users.map(id => this.client.cache.members?.removeIfNI('GuildModeration', id, guildId)));
|
|
18
17
|
return bans;
|
|
19
18
|
}
|
|
20
19
|
/**
|
|
@@ -63,13 +62,12 @@ class BanShorter extends base_1.BaseShorter {
|
|
|
63
62
|
* @returns A Promise that resolves to an array of listed bans.
|
|
64
63
|
*/
|
|
65
64
|
async list(guildId, query, force = false) {
|
|
66
|
-
let bans;
|
|
67
65
|
if (!force) {
|
|
68
|
-
bans =
|
|
69
|
-
if (bans
|
|
66
|
+
const bans = await this.client.cache.bans?.values(guildId);
|
|
67
|
+
if (bans?.length)
|
|
70
68
|
return bans;
|
|
71
69
|
}
|
|
72
|
-
bans = await this.client.proxy.guilds(guildId).bans.get({
|
|
70
|
+
const bans = await this.client.proxy.guilds(guildId).bans.get({
|
|
73
71
|
query,
|
|
74
72
|
});
|
|
75
73
|
await this.client.cache.bans?.set(cache_1.CacheFrom.Rest, bans.map(x => [x.user.id, x]), guildId);
|
|
@@ -19,17 +19,16 @@ class ChannelShorter extends base_1.BaseShorter {
|
|
|
19
19
|
return (0, structures_1.channelFrom)(await this.raw(id, force), this.client);
|
|
20
20
|
}
|
|
21
21
|
async raw(id, force) {
|
|
22
|
-
let channel;
|
|
23
22
|
if (!force) {
|
|
24
|
-
channel = await this.client.cache.channels?.raw(id);
|
|
25
|
-
const overwrites = await this.client.cache.overwrites?.raw(id);
|
|
23
|
+
const channel = await this.client.cache.channels?.raw(id);
|
|
26
24
|
if (channel) {
|
|
25
|
+
const overwrites = await this.client.cache.overwrites?.raw(id);
|
|
27
26
|
if (overwrites)
|
|
28
27
|
channel.permission_overwrites = overwrites;
|
|
29
28
|
return channel;
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
|
-
channel = await this.client.proxy.channels(id).get();
|
|
31
|
+
const channel = await this.client.proxy.channels(id).get();
|
|
33
32
|
await this.client.cache.channels?.patch(cache_1.CacheFrom.Rest, id, 'guild_id' in channel && channel.guild_id ? channel.guild_id : '@me', channel);
|
|
34
33
|
return channel;
|
|
35
34
|
}
|
|
@@ -145,10 +144,12 @@ class ChannelShorter extends base_1.BaseShorter {
|
|
|
145
144
|
if (checkAdmin && role.permissions.has([types_1.PermissionFlagsBits.Administrator])) {
|
|
146
145
|
return new Permissions_1.PermissionsBitField(Permissions_1.PermissionsBitField.All);
|
|
147
146
|
}
|
|
148
|
-
const
|
|
147
|
+
const permissions = new Permissions_1.PermissionsBitField(role.permissions.bits);
|
|
148
|
+
const channelOverwrites = await this.client.cache.overwrites?.get(channelId);
|
|
149
|
+
if (!channelOverwrites)
|
|
150
|
+
return permissions;
|
|
149
151
|
const everyoneOverwrites = channelOverwrites.find(x => x.id === role.guildId);
|
|
150
152
|
const roleOverwrites = channelOverwrites.find(x => x.id === role.id);
|
|
151
|
-
const permissions = new Permissions_1.PermissionsBitField(role.permissions.bits);
|
|
152
153
|
permissions.remove([everyoneOverwrites?.deny.bits ?? 0n]);
|
|
153
154
|
permissions.add([everyoneOverwrites?.allow.bits ?? 0n]);
|
|
154
155
|
permissions.remove([roleOverwrites?.deny.bits ?? 0n]);
|
|
@@ -13,14 +13,12 @@ class EmojiShorter extends base_1.BaseShorter {
|
|
|
13
13
|
* @returns A Promise that resolves to an array of emojis.
|
|
14
14
|
*/
|
|
15
15
|
async list(guildId, force = false) {
|
|
16
|
-
let emojis;
|
|
17
16
|
if (!force) {
|
|
18
|
-
|
|
19
|
-
if (
|
|
20
|
-
return
|
|
21
|
-
}
|
|
17
|
+
const cached = (await this.client.cache.emojis?.values(guildId));
|
|
18
|
+
if (cached?.length)
|
|
19
|
+
return cached;
|
|
22
20
|
}
|
|
23
|
-
emojis = await this.client.proxy.guilds(guildId).emojis.get();
|
|
21
|
+
const emojis = await this.client.proxy.guilds(guildId).emojis.get();
|
|
24
22
|
await this.client.cache.emojis?.set(cache_1.CacheFrom.Rest, emojis.map(x => [x.id, x]), guildId);
|
|
25
23
|
return emojis.map(m => transformers_1.Transformers.GuildEmoji(this.client, m, guildId));
|
|
26
24
|
}
|
|
@@ -46,13 +44,12 @@ class EmojiShorter extends base_1.BaseShorter {
|
|
|
46
44
|
* @returns A Promise that resolves to the fetched emoji.
|
|
47
45
|
*/
|
|
48
46
|
async fetch(guildId, emojiId, force = false) {
|
|
49
|
-
let emoji;
|
|
50
47
|
if (!force) {
|
|
51
|
-
emoji = await this.client.cache.emojis?.get(emojiId);
|
|
48
|
+
const emoji = (await this.client.cache.emojis?.get(emojiId));
|
|
52
49
|
if (emoji)
|
|
53
50
|
return emoji;
|
|
54
51
|
}
|
|
55
|
-
emoji = await this.client.proxy.guilds(guildId).emojis(emojiId).get();
|
|
52
|
+
const emoji = await this.client.proxy.guilds(guildId).emojis(emojiId).get();
|
|
56
53
|
return transformers_1.Transformers.GuildEmoji(this.client, emoji, guildId);
|
|
57
54
|
}
|
|
58
55
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { EmbedColors } from '..';
|
|
1
|
+
import type { EmbedColors, OmitInsert } from '..';
|
|
2
2
|
import type { Attachment, AttachmentDataType, AttachmentResolvable } from '../../builders';
|
|
3
3
|
import type { GuildMember } from '../../structures';
|
|
4
|
-
import type { APIGuildMember, APIPartialEmoji } from '../../types';
|
|
4
|
+
import type { APIGuildMember, APIPartialEmoji, RESTPostAPIApplicationEmojiJSONBody } from '../../types';
|
|
5
5
|
export type EmojiResolvable = string | Partial<APIPartialEmoji> | `<${string | undefined}:${string}:${string}>`;
|
|
6
6
|
export type GuildMemberResolvable = string | Partial<GuildMember> | APIGuildMember;
|
|
7
7
|
export type ColorResolvable = `#${string}` | number | keyof typeof EmbedColors | 'Random' | [number, number, number];
|
|
@@ -9,3 +9,6 @@ export type ImageResolvable = {
|
|
|
9
9
|
data: AttachmentResolvable;
|
|
10
10
|
type: AttachmentDataType;
|
|
11
11
|
} | Attachment;
|
|
12
|
+
export type ApplicationEmojiResolvable = OmitInsert<RESTPostAPIApplicationEmojiJSONBody, 'image', {
|
|
13
|
+
image: ImageResolvable;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { UsingClient } from '..';
|
|
2
|
+
import type { ApplicationEmojiStructure, ApplicationStructure } from '../client';
|
|
3
|
+
import type { ApplicationEmojiResolvable, ObjectToLower } from '../common';
|
|
4
|
+
import type { APIApplication, RESTPatchAPIApplicationEmojiJSONBody, RESTPatchCurrentApplicationJSONBody } from '../types';
|
|
5
|
+
import { DiscordBase } from './extra/DiscordBase';
|
|
6
|
+
export interface Application extends ObjectToLower<APIApplication> {
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Due to current limitations, this is exclusively for the current application.
|
|
10
|
+
*/
|
|
11
|
+
export declare class Application extends DiscordBase<APIApplication> {
|
|
12
|
+
constructor(client: UsingClient, data: APIApplication);
|
|
13
|
+
/**
|
|
14
|
+
* Fetch the current application.
|
|
15
|
+
*/
|
|
16
|
+
fetch(): Promise<ApplicationStructure>;
|
|
17
|
+
/**
|
|
18
|
+
* Edit the current application.
|
|
19
|
+
*/
|
|
20
|
+
edit(data: RESTPatchCurrentApplicationJSONBody): Promise<ApplicationStructure>;
|
|
21
|
+
/**
|
|
22
|
+
* Get an activity instance.
|
|
23
|
+
*/
|
|
24
|
+
getActivityInstance(instanceId: string): Promise<import("../types").RestGetAPIApplicationActivityInstanceResult>;
|
|
25
|
+
emojis: {
|
|
26
|
+
/**
|
|
27
|
+
* Get an application emoji.
|
|
28
|
+
*/
|
|
29
|
+
fetch: (id: string) => Promise<ApplicationEmojiStructure>;
|
|
30
|
+
/**
|
|
31
|
+
* Get the application emojis.
|
|
32
|
+
*/
|
|
33
|
+
list: () => Promise<ApplicationEmojiStructure[]>;
|
|
34
|
+
/**
|
|
35
|
+
* Create an application emoji.
|
|
36
|
+
*/
|
|
37
|
+
create: (data: ApplicationEmojiResolvable) => Promise<ApplicationEmojiStructure>;
|
|
38
|
+
/**
|
|
39
|
+
* Edit an application emoji.
|
|
40
|
+
*/
|
|
41
|
+
edit: (emojiId: string, body: RESTPatchAPIApplicationEmojiJSONBody) => Promise<ApplicationEmojiStructure>;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Application = void 0;
|
|
4
|
+
const DiscordBase_1 = require("./extra/DiscordBase");
|
|
5
|
+
/**
|
|
6
|
+
* Due to current limitations, this is exclusively for the current application.
|
|
7
|
+
*/
|
|
8
|
+
class Application extends DiscordBase_1.DiscordBase {
|
|
9
|
+
constructor(client, data) {
|
|
10
|
+
// override any id for safety
|
|
11
|
+
data.id = client.applicationId;
|
|
12
|
+
super(client, data);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Fetch the current application.
|
|
16
|
+
*/
|
|
17
|
+
fetch() {
|
|
18
|
+
return this.client.applications.fetch();
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Edit the current application.
|
|
22
|
+
*/
|
|
23
|
+
edit(data) {
|
|
24
|
+
return this.client.applications.edit(data);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Get an activity instance.
|
|
28
|
+
*/
|
|
29
|
+
getActivityInstance(instanceId) {
|
|
30
|
+
return this.client.applications.getActivityInstance(instanceId);
|
|
31
|
+
}
|
|
32
|
+
emojis = {
|
|
33
|
+
/**
|
|
34
|
+
* Get an application emoji.
|
|
35
|
+
*/
|
|
36
|
+
fetch: (id) => this.client.applications.getEmoji(id),
|
|
37
|
+
/**
|
|
38
|
+
* Get the application emojis.
|
|
39
|
+
*/
|
|
40
|
+
list: () => this.client.applications.listEmojis(),
|
|
41
|
+
/**
|
|
42
|
+
* Create an application emoji.
|
|
43
|
+
*/
|
|
44
|
+
create: (data) => this.client.applications.createEmoji(data),
|
|
45
|
+
/**
|
|
46
|
+
* Edit an application emoji.
|
|
47
|
+
*/
|
|
48
|
+
edit: (emojiId, body) => this.client.applications.editEmoji(emojiId, body),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
exports.Application = Application;
|
|
@@ -1,11 +1,39 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ClientUserStructure } from '../client';
|
|
2
2
|
import type { UsingClient } from '../commands';
|
|
3
3
|
import type { GatewayReadyDispatchData, RESTPatchAPICurrentUserJSONBody } from '../types';
|
|
4
4
|
import { User } from './User';
|
|
5
|
+
/**
|
|
6
|
+
* Represents a client user that extends the base User class.
|
|
7
|
+
* This class is used to interact with the authenticated user.
|
|
8
|
+
*
|
|
9
|
+
* @extends User
|
|
10
|
+
*/
|
|
5
11
|
export declare class ClientUser extends User {
|
|
6
|
-
application: GatewayReadyDispatchData['application'];
|
|
12
|
+
readonly application: GatewayReadyDispatchData['application'];
|
|
13
|
+
/**
|
|
14
|
+
* Indicates if the user is a bot.
|
|
15
|
+
* @type {true}
|
|
16
|
+
*/
|
|
7
17
|
bot: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Creates an instance of ClientUser.
|
|
20
|
+
*
|
|
21
|
+
* @param client - The client instance used for making API requests.
|
|
22
|
+
* @param data - The user data received from the gateway.
|
|
23
|
+
* @param application - The application data received from the gateway.
|
|
24
|
+
*/
|
|
8
25
|
constructor(client: UsingClient, data: GatewayReadyDispatchData['user'], application: GatewayReadyDispatchData['application']);
|
|
26
|
+
/**
|
|
27
|
+
* Fetches the current user data from the API.
|
|
28
|
+
*
|
|
29
|
+
* @returns A promise that resolves to the ClientUserStructure.
|
|
30
|
+
*/
|
|
9
31
|
fetch(): Promise<ClientUserStructure>;
|
|
32
|
+
/**
|
|
33
|
+
* Edits the current user data.
|
|
34
|
+
*
|
|
35
|
+
* @param body - The data to update the user with.
|
|
36
|
+
* @returns A promise that resolves to the updated ClientUserStructure.
|
|
37
|
+
*/
|
|
10
38
|
edit(body: RESTPatchAPICurrentUserJSONBody): Promise<ClientUserStructure>;
|
|
11
39
|
}
|
|
@@ -1,22 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ClientUser = void 0;
|
|
4
|
-
const client_1 = require("../client");
|
|
5
4
|
const User_1 = require("./User");
|
|
5
|
+
/**
|
|
6
|
+
* Represents a client user that extends the base User class.
|
|
7
|
+
* This class is used to interact with the authenticated user.
|
|
8
|
+
*
|
|
9
|
+
* @extends User
|
|
10
|
+
*/
|
|
6
11
|
class ClientUser extends User_1.User {
|
|
7
12
|
application;
|
|
13
|
+
/**
|
|
14
|
+
* Indicates if the user is a bot.
|
|
15
|
+
* @type {true}
|
|
16
|
+
*/
|
|
8
17
|
bot = true;
|
|
18
|
+
/**
|
|
19
|
+
* Creates an instance of ClientUser.
|
|
20
|
+
*
|
|
21
|
+
* @param client - The client instance used for making API requests.
|
|
22
|
+
* @param data - The user data received from the gateway.
|
|
23
|
+
* @param application - The application data received from the gateway.
|
|
24
|
+
*/
|
|
9
25
|
constructor(client, data, application) {
|
|
10
26
|
super(client, data);
|
|
11
27
|
this.application = application;
|
|
12
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Fetches the current user data from the API.
|
|
31
|
+
*
|
|
32
|
+
* @returns A promise that resolves to the ClientUserStructure.
|
|
33
|
+
*/
|
|
13
34
|
async fetch() {
|
|
14
35
|
const data = await this.api.users('@me').get();
|
|
15
|
-
return
|
|
36
|
+
return this.__patchThis(data);
|
|
16
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Edits the current user data.
|
|
40
|
+
*
|
|
41
|
+
* @param body - The data to update the user with.
|
|
42
|
+
* @returns A promise that resolves to the updated ClientUserStructure.
|
|
43
|
+
*/
|
|
17
44
|
async edit(body) {
|
|
18
45
|
const data = await this.api.users('@me').patch({ body });
|
|
19
|
-
return
|
|
46
|
+
return this.__patchThis(data);
|
|
20
47
|
}
|
|
21
48
|
}
|
|
22
49
|
exports.ClientUser = ClientUser;
|
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
import type { BaseCDNUrlOptions } from '../api';
|
|
2
2
|
import type { ReturnCache } from '../cache';
|
|
3
|
-
import type
|
|
3
|
+
import { type ApplicationEmojiStructure, type GuildEmojiStructure, type GuildStructure, type UserStructure } from '../client';
|
|
4
4
|
import type { UsingClient } from '../commands';
|
|
5
|
-
import { type EmojiShorter, type MethodContext, type ObjectToLower } from '../common';
|
|
6
|
-
import type { APIEmoji,
|
|
5
|
+
import { type EmojiShorter, type MethodContext, type ObjectToLower, type When } from '../common';
|
|
6
|
+
import type { APIApplicationEmoji, APIEmoji, RESTPatchAPIApplicationEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody } from '../types';
|
|
7
7
|
import { DiscordBase } from './extra/DiscordBase';
|
|
8
|
-
export interface
|
|
8
|
+
export interface Emoji extends DiscordBase, ObjectToLower<Omit<APIEmoji, 'id' | 'user'>> {
|
|
9
9
|
}
|
|
10
|
-
export declare class
|
|
11
|
-
|
|
12
|
-
constructor(client: UsingClient, data: APIEmoji
|
|
13
|
-
guild(mode?: 'rest' | 'flow'): Promise<GuildStructure<'cached' | 'api'>>;
|
|
14
|
-
guild(mode: 'cache'): ReturnCache<GuildStructure<'cached'> | undefined>;
|
|
15
|
-
edit(body: RESTPatchAPIChannelJSONBody, reason?: string): Promise<GuildEmojiStructure>;
|
|
16
|
-
delete(reason?: string): Promise<void>;
|
|
17
|
-
fetch(force?: boolean): Promise<GuildEmojiStructure>;
|
|
10
|
+
export declare class Emoji<T extends boolean = false> extends DiscordBase {
|
|
11
|
+
user: When<T, UserStructure>;
|
|
12
|
+
constructor(client: UsingClient, data: APIEmoji);
|
|
18
13
|
url(options?: BaseCDNUrlOptions): string;
|
|
19
14
|
toString(): string;
|
|
20
15
|
toJSON(): {
|
|
@@ -22,6 +17,17 @@ export declare class GuildEmoji extends DiscordBase {
|
|
|
22
17
|
name: string | null;
|
|
23
18
|
animated: boolean;
|
|
24
19
|
};
|
|
20
|
+
}
|
|
21
|
+
export interface GuildEmoji extends Emoji {
|
|
22
|
+
}
|
|
23
|
+
export declare class GuildEmoji extends Emoji {
|
|
24
|
+
readonly guildId: string;
|
|
25
|
+
constructor(client: UsingClient, data: APIEmoji, guildId: string);
|
|
26
|
+
guild(mode?: 'rest' | 'flow'): Promise<GuildStructure<'cached' | 'api'>>;
|
|
27
|
+
guild(mode: 'cache'): ReturnCache<GuildStructure<'cached'> | undefined>;
|
|
28
|
+
edit(body: RESTPatchAPIGuildEmojiJSONBody, reason?: string): Promise<GuildEmojiStructure>;
|
|
29
|
+
delete(reason?: string): Promise<void>;
|
|
30
|
+
fetch(force?: boolean): Promise<GuildEmojiStructure>;
|
|
25
31
|
static methods({ client, guildId }: MethodContext<{
|
|
26
32
|
guildId: string;
|
|
27
33
|
}>): {
|
|
@@ -31,3 +37,9 @@ export declare class GuildEmoji extends DiscordBase {
|
|
|
31
37
|
list: (force?: boolean) => Promise<GuildEmojiStructure[]>;
|
|
32
38
|
};
|
|
33
39
|
}
|
|
40
|
+
export declare class ApplicationEmoji extends Emoji<true> {
|
|
41
|
+
constructor(client: UsingClient, data: APIApplicationEmoji);
|
|
42
|
+
fetch(): Promise<ApplicationEmojiStructure>;
|
|
43
|
+
edit(body: RESTPatchAPIApplicationEmojiJSONBody): Promise<ApplicationEmojiStructure>;
|
|
44
|
+
delete(): Promise<never>;
|
|
45
|
+
}
|
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GuildEmoji = void 0;
|
|
3
|
+
exports.ApplicationEmoji = exports.GuildEmoji = exports.Emoji = void 0;
|
|
4
|
+
const client_1 = require("../client");
|
|
4
5
|
const common_1 = require("../common");
|
|
5
6
|
const DiscordBase_1 = require("./extra/DiscordBase");
|
|
6
|
-
class
|
|
7
|
+
class Emoji extends DiscordBase_1.DiscordBase {
|
|
8
|
+
user;
|
|
9
|
+
constructor(client, data) {
|
|
10
|
+
super(client, { ...data, id: data.id });
|
|
11
|
+
this.user = (data.user && client_1.Transformers.User(client, data.user));
|
|
12
|
+
}
|
|
13
|
+
url(options) {
|
|
14
|
+
return this.rest.cdn.emojis(this.id).get(options);
|
|
15
|
+
}
|
|
16
|
+
toString() {
|
|
17
|
+
return common_1.Formatter.emojiMention(this.id, this.name, this.animated);
|
|
18
|
+
}
|
|
19
|
+
toJSON() {
|
|
20
|
+
return {
|
|
21
|
+
id: this.id,
|
|
22
|
+
name: this.name,
|
|
23
|
+
animated: !!this.animated,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.Emoji = Emoji;
|
|
28
|
+
class GuildEmoji extends Emoji {
|
|
7
29
|
guildId;
|
|
8
30
|
constructor(client, data, guildId) {
|
|
9
|
-
super(client,
|
|
31
|
+
super(client, data);
|
|
10
32
|
this.guildId = guildId;
|
|
11
33
|
}
|
|
12
34
|
guild(mode = 'flow') {
|
|
@@ -27,19 +49,6 @@ class GuildEmoji extends DiscordBase_1.DiscordBase {
|
|
|
27
49
|
fetch(force = false) {
|
|
28
50
|
return this.client.emojis.fetch(this.guildId, this.id, force);
|
|
29
51
|
}
|
|
30
|
-
url(options) {
|
|
31
|
-
return this.rest.cdn.emojis(this.id).get(options);
|
|
32
|
-
}
|
|
33
|
-
toString() {
|
|
34
|
-
return common_1.Formatter.emojiMention(this.id, this.name, this.animated);
|
|
35
|
-
}
|
|
36
|
-
toJSON() {
|
|
37
|
-
return {
|
|
38
|
-
id: this.id,
|
|
39
|
-
name: this.name,
|
|
40
|
-
animated: !!this.animated,
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
52
|
static methods({ client, guildId }) {
|
|
44
53
|
return {
|
|
45
54
|
edit: (emojiId, body, reason) => client.emojis.edit(guildId, emojiId, body, reason),
|
|
@@ -50,3 +59,18 @@ class GuildEmoji extends DiscordBase_1.DiscordBase {
|
|
|
50
59
|
}
|
|
51
60
|
}
|
|
52
61
|
exports.GuildEmoji = GuildEmoji;
|
|
62
|
+
class ApplicationEmoji extends Emoji {
|
|
63
|
+
constructor(client, data) {
|
|
64
|
+
super(client, data);
|
|
65
|
+
}
|
|
66
|
+
fetch() {
|
|
67
|
+
return this.client.applications.getEmoji(this.id);
|
|
68
|
+
}
|
|
69
|
+
edit(body) {
|
|
70
|
+
return this.client.applications.editEmoji(this.id, body);
|
|
71
|
+
}
|
|
72
|
+
delete() {
|
|
73
|
+
return this.client.applications.deleteEmoji(this.id);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.ApplicationEmoji = ApplicationEmoji;
|
|
@@ -10,7 +10,7 @@ class Entitlement extends DiscordBase_1.DiscordBase {
|
|
|
10
10
|
return this.endsAt ? Date.parse(this.endsAt) : null;
|
|
11
11
|
}
|
|
12
12
|
consume() {
|
|
13
|
-
return this.client.applications.consumeEntitlement(this.
|
|
13
|
+
return this.client.applications.consumeEntitlement(this.id);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
exports.Entitlement = Entitlement;
|
package/lib/structures/Guild.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Guild = void 0;
|
|
4
4
|
const AutoModerationRule_1 = require("./AutoModerationRule");
|
|
5
|
+
const Emoji_1 = require("./Emoji");
|
|
5
6
|
const GuildBan_1 = require("./GuildBan");
|
|
6
|
-
const GuildEmoji_1 = require("./GuildEmoji");
|
|
7
7
|
const GuildMember_1 = require("./GuildMember");
|
|
8
8
|
const GuildRole_1 = require("./GuildRole");
|
|
9
9
|
const GuildTemplate_1 = require("./GuildTemplate");
|
|
@@ -62,7 +62,7 @@ class Guild extends BaseGuild_1.BaseGuild {
|
|
|
62
62
|
moderationRules = AutoModerationRule_1.AutoModerationRule.methods({ client: this.client, guildId: this.id });
|
|
63
63
|
roles = GuildRole_1.GuildRole.methods({ client: this.client, guildId: this.id });
|
|
64
64
|
channels = channels_1.BaseChannel.allMethods({ client: this.client, guildId: this.id });
|
|
65
|
-
emojis =
|
|
65
|
+
emojis = Emoji_1.GuildEmoji.methods({ client: this.client, guildId: this.id });
|
|
66
66
|
bans = GuildBan_1.GuildBan.methods({ client: this.client, guildId: this.id });
|
|
67
67
|
edit(body, reason) {
|
|
68
68
|
return this.client.guilds.edit(this.id, body, reason);
|
|
@@ -21,6 +21,10 @@ export declare class BaseGuild extends DiscordBase<APIPartialGuild> {
|
|
|
21
21
|
*/
|
|
22
22
|
fetch(mode?: 'rest' | 'flow'): Promise<GuildStructure<'cached' | 'api'>>;
|
|
23
23
|
fetch(mode: 'cache'): ReturnCache<GuildStructure<'cached'> | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* Leave the guild.
|
|
26
|
+
*/
|
|
27
|
+
leave(): Promise<void | undefined>;
|
|
24
28
|
/**
|
|
25
29
|
* iconURL gets the current guild icon.
|
|
26
30
|
* @link https://discord.com/developers/docs/reference#image-formatting
|
|
@@ -33,14 +33,19 @@ class BaseGuild extends DiscordBase_1.DiscordBase {
|
|
|
33
33
|
return this.client.guilds.fetch(this.id, mode === 'rest');
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Leave the guild.
|
|
38
|
+
*/
|
|
39
|
+
leave() {
|
|
40
|
+
return this.client.guilds.leave(this.id);
|
|
41
|
+
}
|
|
36
42
|
/**
|
|
37
43
|
* iconURL gets the current guild icon.
|
|
38
44
|
* @link https://discord.com/developers/docs/reference#image-formatting
|
|
39
45
|
*/
|
|
40
46
|
iconURL(options) {
|
|
41
|
-
if (!this.icon)
|
|
47
|
+
if (!this.icon)
|
|
42
48
|
return;
|
|
43
|
-
}
|
|
44
49
|
return this.rest.cdn.icons(this.id).get(this.icon, options);
|
|
45
50
|
}
|
|
46
51
|
/**
|
|
@@ -50,9 +55,8 @@ class BaseGuild extends DiscordBase_1.DiscordBase {
|
|
|
50
55
|
* @returns Splash url or void.
|
|
51
56
|
*/
|
|
52
57
|
splashURL(options) {
|
|
53
|
-
if (!this.splash)
|
|
58
|
+
if (!this.splash)
|
|
54
59
|
return;
|
|
55
|
-
}
|
|
56
60
|
return this.rest.cdn['discovery-splashes'](this.id).get(this.splash, options);
|
|
57
61
|
}
|
|
58
62
|
/**
|
|
@@ -62,9 +66,8 @@ class BaseGuild extends DiscordBase_1.DiscordBase {
|
|
|
62
66
|
* @returns Banner url or void
|
|
63
67
|
*/
|
|
64
68
|
bannerURL(options) {
|
|
65
|
-
if (!this.banner)
|
|
69
|
+
if (!this.banner)
|
|
66
70
|
return;
|
|
67
|
-
}
|
|
68
71
|
return this.rest.cdn.banners(this.id).get(this.banner, options);
|
|
69
72
|
}
|
|
70
73
|
/**
|
|
@@ -2,7 +2,7 @@ export * from './AnonymousGuild';
|
|
|
2
2
|
export * from './AutoModerationRule';
|
|
3
3
|
export * from './ClientUser';
|
|
4
4
|
export * from './Guild';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './Emoji';
|
|
6
6
|
export * from './GuildMember';
|
|
7
7
|
export * from './GuildPreview';
|
|
8
8
|
export * from './GuildRole';
|
package/lib/structures/index.js
CHANGED
|
@@ -18,7 +18,7 @@ __exportStar(require("./AnonymousGuild"), exports);
|
|
|
18
18
|
__exportStar(require("./AutoModerationRule"), exports);
|
|
19
19
|
__exportStar(require("./ClientUser"), exports);
|
|
20
20
|
__exportStar(require("./Guild"), exports);
|
|
21
|
-
__exportStar(require("./
|
|
21
|
+
__exportStar(require("./Emoji"), exports);
|
|
22
22
|
__exportStar(require("./GuildMember"), exports);
|
|
23
23
|
__exportStar(require("./GuildPreview"), exports);
|
|
24
24
|
__exportStar(require("./GuildRole"), exports);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Types extracted from https://discord.com/developers/docs/resources/application
|
|
3
3
|
*/
|
|
4
|
-
import type { LocalizationMap } from '.';
|
|
4
|
+
import type { APIEmoji, LocalizationMap } from '.';
|
|
5
5
|
import type { Permissions, Snowflake } from '..';
|
|
6
|
+
import type { MakeRequired } from '../../common';
|
|
6
7
|
import type { APIPartialGuild } from './guild';
|
|
7
8
|
import type { ApplicationIntegrationType } from './interactions';
|
|
8
9
|
import type { OAuth2Scopes } from './oauth2';
|
|
@@ -284,3 +285,32 @@ export declare enum ApplicationRoleConnectionMetadataType {
|
|
|
284
285
|
*/
|
|
285
286
|
BooleanNotEqual = 8
|
|
286
287
|
}
|
|
288
|
+
/**
|
|
289
|
+
* https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-instance-object
|
|
290
|
+
*/
|
|
291
|
+
export interface APIActivityInstance {
|
|
292
|
+
application_id: string;
|
|
293
|
+
instance_id: string;
|
|
294
|
+
launch_id: string;
|
|
295
|
+
/** Location the instance is runnning in */
|
|
296
|
+
location: APIActivityLocation;
|
|
297
|
+
users: string[];
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-location-object
|
|
301
|
+
*/
|
|
302
|
+
export interface APIActivityLocation {
|
|
303
|
+
id: string;
|
|
304
|
+
/** Enum describing kind of location */
|
|
305
|
+
kind: ActivityLocation;
|
|
306
|
+
channel_id: string;
|
|
307
|
+
guild_id?: string | null;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-location-kind-enum
|
|
311
|
+
*/
|
|
312
|
+
export declare enum ActivityLocation {
|
|
313
|
+
GuildChannel = "gc",
|
|
314
|
+
PrivateChannel = "pc"
|
|
315
|
+
}
|
|
316
|
+
export type APIApplicationEmoji = MakeRequired<APIEmoji, 'id' | 'user'>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Types extracted from https://discord.com/developers/docs/resources/application
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ApplicationRoleConnectionMetadataType = exports.ApplicationFlags = void 0;
|
|
6
|
+
exports.ActivityLocation = exports.ApplicationRoleConnectionMetadataType = exports.ApplicationFlags = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* https://discord.com/developers/docs/resources/application#application-object-application-flags
|
|
9
9
|
*/
|
|
@@ -115,3 +115,11 @@ var ApplicationRoleConnectionMetadataType;
|
|
|
115
115
|
*/
|
|
116
116
|
ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["BooleanNotEqual"] = 8] = "BooleanNotEqual";
|
|
117
117
|
})(ApplicationRoleConnectionMetadataType || (exports.ApplicationRoleConnectionMetadataType = ApplicationRoleConnectionMetadataType = {}));
|
|
118
|
+
/**
|
|
119
|
+
* https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-location-kind-enum
|
|
120
|
+
*/
|
|
121
|
+
var ActivityLocation;
|
|
122
|
+
(function (ActivityLocation) {
|
|
123
|
+
ActivityLocation["GuildChannel"] = "gc";
|
|
124
|
+
ActivityLocation["PrivateChannel"] = "pc";
|
|
125
|
+
})(ActivityLocation || (exports.ActivityLocation = ActivityLocation = {}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { APIApplication,
|
|
1
|
+
import type { APIActivityInstance, APIApplication, APIApplicationEmoji, APIApplicationRoleConnectionMetadata } from '../payloads';
|
|
2
2
|
import type { Nullable, StrictPartial } from '../utils';
|
|
3
3
|
import type { RESTPatchAPIGuildEmojiJSONBody, RESTPostAPIGuildEmojiJSONBody } from './emoji';
|
|
4
4
|
/**
|
|
@@ -29,12 +29,12 @@ export type RESTPatchCurrentApplicationResult = APIApplication;
|
|
|
29
29
|
* https://discord.com/developers/docs/resources/emoji#list-application-emojis
|
|
30
30
|
*/
|
|
31
31
|
export interface RESTGetAPIApplicationEmojisResult {
|
|
32
|
-
|
|
32
|
+
items: APIApplicationEmoji[];
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* https://discord.com/developers/docs/resources/emoji#get-application-emoji
|
|
36
36
|
*/
|
|
37
|
-
export type RESTGetAPIApplicationEmojiResult =
|
|
37
|
+
export type RESTGetAPIApplicationEmojiResult = APIApplicationEmoji;
|
|
38
38
|
/**
|
|
39
39
|
* https://discord.com/developers/docs/resources/emoji#create-application-emoji-json-params
|
|
40
40
|
*/
|
|
@@ -42,7 +42,7 @@ export type RESTPostAPIApplicationEmojiJSONBody = Pick<RESTPostAPIGuildEmojiJSON
|
|
|
42
42
|
/**
|
|
43
43
|
* https://discord.com/developers/docs/resources/emoji#create-application-emoji
|
|
44
44
|
*/
|
|
45
|
-
export type RESTPostAPIApplicationEmojiResult =
|
|
45
|
+
export type RESTPostAPIApplicationEmojiResult = APIApplicationEmoji;
|
|
46
46
|
/**
|
|
47
47
|
* https://discord.com/developers/docs/resources/emoji#modify-application-emoji
|
|
48
48
|
*/
|
|
@@ -50,8 +50,12 @@ export type RESTPatchAPIApplicationEmojiJSONBody = Pick<RESTPatchAPIGuildEmojiJS
|
|
|
50
50
|
/**
|
|
51
51
|
* https://discord.com/developers/docs/resources/emoji#modify-application-emoji
|
|
52
52
|
*/
|
|
53
|
-
export type RESTPatchAPIApplicationEmojiResult =
|
|
53
|
+
export type RESTPatchAPIApplicationEmojiResult = APIApplicationEmoji;
|
|
54
54
|
/**
|
|
55
55
|
* https://discord.com/developers/docs/resources/emoji#delete-application-emoji
|
|
56
56
|
*/
|
|
57
57
|
export type RESTDeleteAPIApplicationEmojiResult = never;
|
|
58
|
+
/**
|
|
59
|
+
* https://discord.com/developers/docs/resources/application#get-application-activity-instance
|
|
60
|
+
*/
|
|
61
|
+
export type RestGetAPIApplicationActivityInstanceResult = APIActivityInstance | undefined;
|