disgroove 2.2.3-dev.e049f9f → 2.2.3
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/dist/lib/Client.d.ts +17 -0
- package/dist/lib/Client.js +30 -0
- package/dist/lib/rest/Endpoints.d.ts +2 -0
- package/dist/lib/rest/Endpoints.js +5 -1
- package/dist/package.json +1 -1
- package/package.json +35 -35
package/dist/lib/Client.d.ts
CHANGED
@@ -136,6 +136,11 @@ export declare class Client extends EventEmitter {
|
|
136
136
|
exemptRoles?: Array<snowflake>;
|
137
137
|
exemptChannels?: Array<snowflake>;
|
138
138
|
}, reason?: string): Promise<AutoModerationRule>;
|
139
|
+
/** https://discord.com/developers/docs/resources/emoji#create-application-emoji */
|
140
|
+
createApplicationEmoji(applicationID: snowflake, options: {
|
141
|
+
name: string;
|
142
|
+
image: string;
|
143
|
+
}): Promise<Emoji>;
|
139
144
|
/** https://discord.com/developers/docs/resources/guild#create-guild-channel */
|
140
145
|
createChannel(guildID: snowflake, options: {
|
141
146
|
name: string;
|
@@ -367,6 +372,8 @@ export declare class Client extends EventEmitter {
|
|
367
372
|
deleteAllMessageReactions(channelID: snowflake, messageID: snowflake, emoji?: string): void;
|
368
373
|
/** https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule */
|
369
374
|
deleteAutoModerationRule(guildID: snowflake, autoModerationRuleID: snowflake, reason?: string): void;
|
375
|
+
/** https://discord.com/developers/docs/resources/emoji#delete-application-emoji */
|
376
|
+
deleteApplicationEmoji(applicationID: snowflake, emojiID: snowflake): void;
|
370
377
|
/** https://discord.com/developers/docs/resources/channel#deleteclose-channel */
|
371
378
|
deleteChannel(channelID: snowflake, reason?: string): Promise<Channel>;
|
372
379
|
/** https://discord.com/developers/docs/resources/channel#delete-channel-permission */
|
@@ -427,6 +434,10 @@ export declare class Client extends EventEmitter {
|
|
427
434
|
editApplicationCommandPermissions(applicationID: snowflake, guildID: snowflake, commandID: snowflake, options: {
|
428
435
|
permissions: Array<ApplicationCommandPermission>;
|
429
436
|
}): Promise<GuildApplicationCommandPermissions>;
|
437
|
+
/** https://discord.com/developers/docs/resources/emoji#modify-application-emoji */
|
438
|
+
editApplicationEmoji(applicationID: snowflake, emojiID: snowflake, options: {
|
439
|
+
name: string;
|
440
|
+
}): Promise<Emoji>;
|
430
441
|
/** https://discord.com/developers/docs/resources/channel#modify-channel */
|
431
442
|
editChannel(channelID: snowflake, options: {
|
432
443
|
name?: string;
|
@@ -740,6 +751,12 @@ export declare class Client extends EventEmitter {
|
|
740
751
|
getAutoModerationRules(guildID: snowflake): Promise<Array<AutoModerationRule>>;
|
741
752
|
/** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
|
742
753
|
getApplicationCommandPermissions(applicationID: snowflake, guildID: snowflake, commandID: snowflake): Promise<GuildApplicationCommandPermissions>;
|
754
|
+
/** https://discord.com/developers/docs/resources/emoji#get-application-emoji */
|
755
|
+
getApplicationEmoji(applicationID: snowflake, emojiID: snowflake): Promise<Emoji>;
|
756
|
+
/** https://discord.com/developers/docs/resources/emoji#list-application-emojis */
|
757
|
+
getApplicationEmojis(applicationID: snowflake): Promise<{
|
758
|
+
items: Array<Emoji>;
|
759
|
+
}>;
|
743
760
|
/** https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records */
|
744
761
|
getApplicationRoleConnectionMetadataRecords(applicationID: snowflake): Promise<Array<ApplicationRoleConnectionMetadata>>;
|
745
762
|
/** https://discord.com/developers/docs/resources/channel#get-channel */
|
package/dist/lib/Client.js
CHANGED
@@ -183,6 +183,13 @@ class Client extends node_events_1.default {
|
|
183
183
|
});
|
184
184
|
return transformers_1.AutoModeration.autoModerationRuleFromRaw(response);
|
185
185
|
}
|
186
|
+
/** https://discord.com/developers/docs/resources/emoji#create-application-emoji */
|
187
|
+
async createApplicationEmoji(applicationID, options) {
|
188
|
+
const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.applicationEmojis(applicationID), {
|
189
|
+
json: options,
|
190
|
+
});
|
191
|
+
return transformers_1.Emojis.emojiFromRaw(response);
|
192
|
+
}
|
186
193
|
/** https://discord.com/developers/docs/resources/guild#create-guild-channel */
|
187
194
|
async createChannel(guildID, options, reason) {
|
188
195
|
const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildChannels(guildID), {
|
@@ -707,6 +714,10 @@ class Client extends node_events_1.default {
|
|
707
714
|
reason,
|
708
715
|
});
|
709
716
|
}
|
717
|
+
/** https://discord.com/developers/docs/resources/emoji#delete-application-emoji */
|
718
|
+
deleteApplicationEmoji(applicationID, emojiID) {
|
719
|
+
this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.applicationEmoji(applicationID, emojiID));
|
720
|
+
}
|
710
721
|
/** https://discord.com/developers/docs/resources/channel#deleteclose-channel */
|
711
722
|
async deleteChannel(channelID, reason) {
|
712
723
|
const response = await this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channel(channelID), {
|
@@ -856,6 +867,13 @@ class Client extends node_events_1.default {
|
|
856
867
|
});
|
857
868
|
return transformers_1.Guilds.guildApplicationCommandPermissionsFromRaw(response);
|
858
869
|
}
|
870
|
+
/** https://discord.com/developers/docs/resources/emoji#modify-application-emoji */
|
871
|
+
async editApplicationEmoji(applicationID, emojiID, options) {
|
872
|
+
const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.applicationEmoji(applicationID, emojiID), {
|
873
|
+
json: options,
|
874
|
+
});
|
875
|
+
return transformers_1.Emojis.emojiFromRaw(response);
|
876
|
+
}
|
859
877
|
/** https://discord.com/developers/docs/resources/channel#modify-channel */
|
860
878
|
async editChannel(channelID, options, reason) {
|
861
879
|
const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.channel(channelID), {
|
@@ -1546,6 +1564,18 @@ class Client extends node_events_1.default {
|
|
1546
1564
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationCommandPermissions(applicationID, guildID, commandID));
|
1547
1565
|
return transformers_1.Guilds.guildApplicationCommandPermissionsFromRaw(response);
|
1548
1566
|
}
|
1567
|
+
/** https://discord.com/developers/docs/resources/emoji#get-application-emoji */
|
1568
|
+
async getApplicationEmoji(applicationID, emojiID) {
|
1569
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEmoji(applicationID, emojiID));
|
1570
|
+
return transformers_1.Emojis.emojiFromRaw(response);
|
1571
|
+
}
|
1572
|
+
/** https://discord.com/developers/docs/resources/emoji#list-application-emojis */
|
1573
|
+
async getApplicationEmojis(applicationID) {
|
1574
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEmojis(applicationID));
|
1575
|
+
return {
|
1576
|
+
items: response.items.map((emoji) => transformers_1.Emojis.emojiFromRaw(emoji)),
|
1577
|
+
};
|
1578
|
+
}
|
1549
1579
|
/** https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records */
|
1550
1580
|
async getApplicationRoleConnectionMetadataRecords(applicationID) {
|
1551
1581
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationRoleConnectionMetadata(applicationID));
|
@@ -72,6 +72,8 @@ export declare const applicationCommand: (applicationID: snowflake, commandID: s
|
|
72
72
|
export declare const applicationCommands: (applicationID: snowflake) => `applications/${string}/commands`;
|
73
73
|
export declare const applicationCommandPermissions: (applicationID: snowflake, guildID: snowflake, commandID: snowflake) => `applications/${string}/guilds/${string}/commands/${string}/permissions`;
|
74
74
|
export declare const applicationUser: () => "applications/@me";
|
75
|
+
export declare const applicationEmoji: (applicationID: snowflake, emojiID: snowflake) => `applications/${string}/emojis/${string}`;
|
76
|
+
export declare const applicationEmojis: (applicationID: snowflake) => `applications/${string}/emojis`;
|
75
77
|
export declare const applicationEntitlement: (applicationID: snowflake, entitlementID: snowflake) => `applications/${string}/entitlements/${string}`;
|
76
78
|
export declare const applicationEntitlementConsume: (applicationID: snowflake, entitlementID: snowflake) => `applications/${string}/entitlements/${string}/consume`;
|
77
79
|
export declare const applicationEntitlements: (applicationID: snowflake) => `applications/${string}/entitlements`;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.channelMessageCrosspost = exports.channelMessageAllReactions = exports.channelMessage = exports.channelInvites = exports.channelFollowers = exports.channelBulkDelete = exports.channel = exports.template = exports.guildWidgetSettings = exports.guildWidgetJSON = exports.guildWidgetImage = exports.guildWelcomeScreen = exports.guildWebhooks = exports.guildVoiceState = exports.guildVoiceRegions = exports.guildVanityURL = exports.guildTemplates = exports.guildTemplate = exports.guildStickers = exports.guildSticker = exports.guildScheduledEventUsers = exports.guildScheduledEvents = exports.guildScheduledEvent = exports.guildRoles = exports.guildRole = exports.guildPrune = exports.guildPreview = exports.guildOnboarding = exports.guildMemberVerification = exports.guildMembersSearch = exports.guildMembers = exports.guildMemberRole = exports.guildMember = exports.guildMFA = exports.guildInvites = exports.guildIntegrations = exports.guildIntegration = exports.guildEmojis = exports.guildEmoji = exports.guildMemberNickname = exports.guildChannels = exports.guildBulkBan = exports.guildBans = exports.guildBan = exports.guildAutoModerationRules = exports.guildAutoModerationRule = exports.guildAuditLog = exports.guildActiveThreads = exports.guilds = exports.guild = void 0;
|
4
|
-
exports.voiceRegions = exports.stickerPacks = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = exports.oauth2Application = exports.oauth2Authorize = exports.gatewayBot = exports.gateway = exports.webhookPlatform = exports.webhookMessage = exports.webhook = exports.guildApplicationCommandsPermissions = exports.applicationSKUs = exports.applicationRoleConnectionMetadata = exports.applicationGuildCommands = exports.applicationGuildCommand = exports.applicationEntitlements = exports.applicationEntitlementConsume = exports.applicationEntitlement = exports.applicationUser = exports.applicationCommandPermissions = exports.applicationCommands = exports.applicationCommand = exports.userGuilds = exports.userGuild = exports.userConnections = exports.userChannels = exports.userApplicationRoleConnection = exports.user = exports.pollExpire = exports.pollAnswerVoters = exports.threadMembers = exports.threads = exports.channelWebhooks = exports.channelTyping = exports.channelThreads = exports.channelRecipient = exports.channelPins = exports.channelPin = exports.channelPermission = exports.channelMessages = exports.channelMessageReaction = void 0;
|
4
|
+
exports.voiceRegions = exports.stickerPacks = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = exports.oauth2Application = exports.oauth2Authorize = exports.gatewayBot = exports.gateway = exports.webhookPlatform = exports.webhookMessage = exports.webhook = exports.guildApplicationCommandsPermissions = exports.applicationSKUs = exports.applicationRoleConnectionMetadata = exports.applicationGuildCommands = exports.applicationGuildCommand = exports.applicationEntitlements = exports.applicationEntitlementConsume = exports.applicationEntitlement = exports.applicationEmojis = exports.applicationEmoji = exports.applicationUser = exports.applicationCommandPermissions = exports.applicationCommands = exports.applicationCommand = exports.userGuilds = exports.userGuild = exports.userConnections = exports.userChannels = exports.userApplicationRoleConnection = exports.user = exports.pollExpire = exports.pollAnswerVoters = exports.threadMembers = exports.threads = exports.channelWebhooks = exports.channelTyping = exports.channelThreads = exports.channelRecipient = exports.channelPins = exports.channelPin = exports.channelPermission = exports.channelMessages = exports.channelMessageReaction = void 0;
|
5
5
|
// Guilds
|
6
6
|
const guild = (guildID) => `guilds/${guildID}`;
|
7
7
|
exports.guild = guild;
|
@@ -160,6 +160,10 @@ const applicationCommandPermissions = (applicationID, guildID, commandID) => `ap
|
|
160
160
|
exports.applicationCommandPermissions = applicationCommandPermissions;
|
161
161
|
const applicationUser = () => "applications/@me";
|
162
162
|
exports.applicationUser = applicationUser;
|
163
|
+
const applicationEmoji = (applicationID, emojiID) => `applications/${applicationID}/emojis/${emojiID}`;
|
164
|
+
exports.applicationEmoji = applicationEmoji;
|
165
|
+
const applicationEmojis = (applicationID) => `applications/${applicationID}/emojis`;
|
166
|
+
exports.applicationEmojis = applicationEmojis;
|
163
167
|
const applicationEntitlement = (applicationID, entitlementID) => `applications/${applicationID}/entitlements/${entitlementID}`;
|
164
168
|
exports.applicationEntitlement = applicationEntitlement;
|
165
169
|
const applicationEntitlementConsume = (applicationID, entitlementID) => `applications/${applicationID}/entitlements/${entitlementID}/consume`;
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
@@ -1,35 +1,35 @@
|
|
1
|
-
{
|
2
|
-
"name": "disgroove",
|
3
|
-
"version": "2.2.3
|
4
|
-
"description": "A module to interface with Discord",
|
5
|
-
"main": "./dist/lib/index.js",
|
6
|
-
"types": "./dist/lib/index.d.ts",
|
7
|
-
"repository": {
|
8
|
-
"type": "git",
|
9
|
-
"url": "git+https://github.com/XenKys/disgroove.git"
|
10
|
-
},
|
11
|
-
"keywords": [
|
12
|
-
"api",
|
13
|
-
"bot",
|
14
|
-
"discord",
|
15
|
-
"gateway",
|
16
|
-
"http",
|
17
|
-
"https",
|
18
|
-
"rest",
|
19
|
-
"wrapper"
|
20
|
-
],
|
21
|
-
"author": "XenKys",
|
22
|
-
"license": "MIT",
|
23
|
-
"bugs": {
|
24
|
-
"url": "https://github.com/XenKys/disgroove/issues"
|
25
|
-
},
|
26
|
-
"homepage": "https://github.com/XenKys/disgroove#readme",
|
27
|
-
"devDependencies": {
|
28
|
-
"@types/node": "^20.14.10",
|
29
|
-
"@types/ws": "^8.5.10",
|
30
|
-
"typescript": "^5.5.3"
|
31
|
-
},
|
32
|
-
"dependencies": {
|
33
|
-
"ws": "^8.18.0"
|
34
|
-
}
|
35
|
-
}
|
1
|
+
{
|
2
|
+
"name": "disgroove",
|
3
|
+
"version": "2.2.3",
|
4
|
+
"description": "A module to interface with Discord",
|
5
|
+
"main": "./dist/lib/index.js",
|
6
|
+
"types": "./dist/lib/index.d.ts",
|
7
|
+
"repository": {
|
8
|
+
"type": "git",
|
9
|
+
"url": "git+https://github.com/XenKys/disgroove.git"
|
10
|
+
},
|
11
|
+
"keywords": [
|
12
|
+
"api",
|
13
|
+
"bot",
|
14
|
+
"discord",
|
15
|
+
"gateway",
|
16
|
+
"http",
|
17
|
+
"https",
|
18
|
+
"rest",
|
19
|
+
"wrapper"
|
20
|
+
],
|
21
|
+
"author": "XenKys",
|
22
|
+
"license": "MIT",
|
23
|
+
"bugs": {
|
24
|
+
"url": "https://github.com/XenKys/disgroove/issues"
|
25
|
+
},
|
26
|
+
"homepage": "https://github.com/XenKys/disgroove#readme",
|
27
|
+
"devDependencies": {
|
28
|
+
"@types/node": "^20.14.10",
|
29
|
+
"@types/ws": "^8.5.10",
|
30
|
+
"typescript": "^5.5.3"
|
31
|
+
},
|
32
|
+
"dependencies": {
|
33
|
+
"ws": "^8.18.0"
|
34
|
+
}
|
35
|
+
}
|