@discordeno/bot 19.0.0-next.e19eca5 → 19.0.0-next.e2d86ea
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/bot.d.ts +3 -1
- package/dist/bot.d.ts.map +1 -1
- package/dist/bot.js +5 -0
- package/dist/bot.js.map +1 -1
- package/dist/handlers/channels/index.d.ts +1 -0
- package/dist/handlers/channels/index.d.ts.map +1 -1
- package/dist/handlers/channels/index.js +1 -0
- package/dist/handlers/channels/index.js.map +1 -1
- package/dist/helpers.d.ts +205 -0
- package/dist/helpers.d.ts.map +1 -0
- package/dist/helpers.js +553 -0
- package/dist/helpers.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/transformers/activity.d.ts +15 -15
- package/dist/transformers/application.d.ts +3 -3
- package/dist/transformers/applicationCommand.d.ts +3 -3
- package/dist/transformers/applicationCommandPermission.d.ts +1 -1
- package/dist/transformers/attachment.d.ts +3 -3
- package/dist/transformers/auditLogEntry.d.ts +6 -6
- package/dist/transformers/automodActionExecution.d.ts +5 -5
- package/dist/transformers/channel.d.ts +3 -3
- package/dist/transformers/channel.d.ts.map +1 -1
- package/dist/transformers/channel.js +2 -1
- package/dist/transformers/channel.js.map +1 -1
- package/dist/transformers/embed.d.ts +3 -3
- package/dist/transformers/emoji.d.ts +4 -4
- package/dist/transformers/guild.d.ts +1 -1
- package/dist/transformers/index.d.ts +2 -0
- package/dist/transformers/index.d.ts.map +1 -1
- package/dist/transformers/index.js +2 -0
- package/dist/transformers/index.js.map +1 -1
- package/dist/transformers/integration.d.ts +7 -7
- package/dist/transformers/interaction.d.ts +10 -1
- package/dist/transformers/interaction.d.ts.map +1 -1
- package/dist/transformers/interaction.js +26 -1
- package/dist/transformers/interaction.js.map +1 -1
- package/dist/transformers/invite.d.ts +13 -13
- package/dist/transformers/member.d.ts +2 -2
- package/dist/transformers/member.d.ts.map +1 -1
- package/dist/transformers/member.js +2 -2
- package/dist/transformers/member.js.map +1 -1
- package/dist/transformers/presence.d.ts +1 -1
- package/dist/transformers/reverse/index.d.ts +3 -0
- package/dist/transformers/reverse/index.d.ts.map +1 -1
- package/dist/transformers/reverse/index.js +3 -0
- package/dist/transformers/reverse/index.js.map +1 -1
- package/dist/transformers/role.d.ts +2 -2
- package/dist/transformers/role.d.ts.map +1 -1
- package/dist/transformers/role.js +1 -1
- package/dist/transformers/role.js.map +1 -1
- package/dist/transformers/scheduledEvent.d.ts +5 -5
- package/dist/transformers/sticker.d.ts +5 -5
- package/dist/transformers/template.d.ts +93 -93
- package/dist/transformers/toggles/index.d.ts +2 -0
- package/dist/transformers/toggles/index.d.ts.map +1 -1
- package/dist/transformers/toggles/index.js +2 -0
- package/dist/transformers/toggles/index.js.map +1 -1
- package/dist/transformers/voiceRegion.d.ts +1 -1
- package/dist/transformers/voiceState.d.ts +2 -2
- package/dist/transformers/webhook.d.ts +6 -6
- package/dist/transformers.d.ts +3 -3
- package/dist/transformers.d.ts.map +1 -1
- package/dist/transformers.js.map +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/helpers.ts"],"sourcesContent":["import type { CreateWebhook } from '@discordeno/rest'\nimport type {\n ApplicationCommandPermissions,\n AtLeastOne,\n BeginGuildPrune,\n BigString,\n CamelizedDiscordActiveThreads,\n CamelizedDiscordArchivedThreads,\n CamelizedDiscordAuditLog,\n CamelizedDiscordBan,\n CamelizedDiscordFollowedChannel,\n CamelizedDiscordGetGatewayBot,\n CamelizedDiscordGuildPreview,\n CamelizedDiscordGuildWidgetSettings,\n CamelizedDiscordInvite,\n CamelizedDiscordInviteMetadata,\n CamelizedDiscordModifyGuildWelcomeScreen,\n CamelizedDiscordPrunedCount,\n CamelizedDiscordVanityUrl,\n CamelizedDiscordVoiceRegion,\n CreateApplicationCommand,\n CreateAutoModerationRuleOptions,\n CreateChannelInvite,\n CreateForumPostWithMessage,\n CreateGuild,\n CreateGuildBan,\n CreateGuildChannel,\n CreateGuildEmoji,\n CreateGuildFromTemplate,\n CreateGuildRole,\n CreateGuildStickerOptions,\n CreateMessageOptions,\n CreateScheduledEvent,\n CreateStageInstance,\n CreateTemplate,\n DeleteWebhookMessageOptions,\n DiscordMessage,\n EditAutoModerationRuleOptions,\n EditBotMemberOptions,\n EditChannelPermissionOverridesOptions,\n EditGuildRole,\n EditGuildStickerOptions,\n EditMessage,\n EditOwnVoiceState,\n EditScheduledEvent,\n EditUserVoiceState,\n ExecuteWebhook,\n GetBans,\n GetGuildAuditLog,\n GetGuildPruneCountQuery,\n GetInvite,\n GetMessagesOptions,\n GetReactions,\n GetScheduledEventUsers,\n GetScheduledEvents,\n GetWebhookMessageOptions,\n InteractionCallbackData,\n InteractionResponse,\n ListArchivedThreads,\n ListGuildMembers,\n MfaLevels,\n ModifyChannel,\n ModifyGuild,\n ModifyGuildChannelPositions,\n ModifyGuildEmoji,\n ModifyGuildMember,\n ModifyGuildTemplate,\n ModifyRolePositions,\n ModifyWebhook,\n SearchMembers,\n StartThreadWithMessage,\n StartThreadWithoutMessage,\n} from '@discordeno/types'\nimport { snakelize } from '@discordeno/utils'\nimport type { Bot } from './bot.js'\nimport type { Application } from './transformers/application.js'\nimport type { ApplicationCommand } from './transformers/applicationCommand.js'\nimport type { ApplicationCommandPermission } from './transformers/applicationCommandPermission.js'\nimport type { AutoModerationRule } from './transformers/automodRule.js'\nimport type { Channel } from './transformers/channel.js'\nimport type { Emoji } from './transformers/emoji.js'\nimport type { Guild } from './transformers/guild.js'\nimport type { Integration } from './transformers/integration.js'\nimport type { Member } from './transformers/member.js'\nimport type { Message } from './transformers/message.js'\nimport type { Role } from './transformers/role.js'\nimport type { ScheduledEvent } from './transformers/scheduledEvent.js'\nimport type { StageInstance } from './transformers/stageInstance.js'\nimport type { Sticker, StickerPack } from './transformers/sticker.js'\nimport type { Template } from './transformers/template.js'\nimport type { ThreadMember } from './transformers/threadMember.js'\nimport type { User } from './transformers/user.js'\nimport type { Webhook } from './transformers/webhook.js'\nimport type { WelcomeScreen } from './transformers/welcomeScreen.js'\nimport type { GuildWidget } from './transformers/widget.js'\nimport type { GuildWidgetSettings } from './transformers/widgetSettings.js'\n\nexport function createBotHelpers(bot: Bot): BotHelpers {\n return {\n createAutomodRule: async (guildId, options, reason) => {\n return bot.transformers.automodRule(bot, snakelize(await bot.rest.createAutomodRule(guildId, options, reason)))\n },\n createChannel: async (guildId, options, reason) => {\n return bot.transformers.channel(bot, { channel: snakelize(await bot.rest.createChannel(guildId, options, reason)), guildId })\n },\n createEmoji: async (guildId, options, reason) => {\n return bot.transformers.emoji(bot, snakelize(await bot.rest.createEmoji(guildId, options, reason)))\n },\n createForumThread: async (channelId, options, reason) => {\n return bot.transformers.channel(bot, { channel: snakelize(await bot.rest.createForumThread(channelId, options, reason)) })\n },\n createGlobalApplicationCommand: async (command) => {\n return bot.transformers.applicationCommand(bot, snakelize(await bot.rest.createGlobalApplicationCommand(command)))\n },\n createGuild: async (options) => {\n return bot.transformers.guild(bot, { guild: snakelize(await bot.rest.createGuild(options)), shardId: 0 })\n },\n createGuildApplicationCommand: async (command, guildId) => {\n return bot.transformers.applicationCommand(bot, snakelize(await bot.rest.createGuildApplicationCommand(command, guildId)))\n },\n createGuildFromTemplate: async (templateCode, options) => {\n return bot.transformers.guild(bot, { guild: snakelize(await bot.rest.createGuildFromTemplate(templateCode, options)), shardId: 0 })\n },\n createGuildSticker: async (guildId, options, reason) => {\n return bot.transformers.sticker(bot, snakelize(await bot.rest.createGuildSticker(guildId, options, reason)))\n },\n createGuildTemplate: async (guildId, options) => {\n return bot.transformers.template(bot, snakelize(await bot.rest.createGuildTemplate(guildId, options)))\n },\n createInvite: async (channelId, options, reason) => {\n return await bot.rest.createInvite(channelId, options, reason)\n },\n createRole: async (guildId, options, reason) => {\n return bot.transformers.role(bot, { role: snakelize(await bot.rest.createRole(guildId, options, reason)), guildId })\n },\n createScheduledEvent: async (guildId, options, reason) => {\n return bot.transformers.scheduledEvent(bot, snakelize(await bot.rest.createScheduledEvent(guildId, options, reason)))\n },\n createStageInstance: async (options, reason) => {\n return bot.transformers.stageInstance(bot, snakelize(await bot.rest.createStageInstance(options, reason)))\n },\n createWebhook: async (channelId, options, reason) => {\n return bot.transformers.webhook(bot, snakelize(await bot.rest.createWebhook(channelId, options, reason)))\n },\n editApplicationCommandPermissions: async (guildId, commandId, bearerToken, options) => {\n return bot.transformers.applicationCommandPermission(\n bot,\n snakelize(await bot.rest.editApplicationCommandPermissions(guildId, commandId, bearerToken, options)),\n )\n },\n editAutomodRule: async (guildId, ruleId, options, reason) => {\n return bot.transformers.automodRule(bot, snakelize(await bot.rest.editAutomodRule(guildId, ruleId, options, reason)))\n },\n editBotProfile: async (options) => {\n return bot.transformers.user(bot, snakelize(await bot.rest.editBotProfile(options)))\n },\n editChannel: async (channelId, options, reason) => {\n return bot.transformers.channel(bot, { channel: snakelize(await bot.rest.editChannel(channelId, options, reason)) })\n },\n editEmoji: async (guildId, id, options, reason) => {\n return bot.transformers.emoji(bot, snakelize(await bot.rest.editEmoji(guildId, id, options, reason)))\n },\n editFollowupMessage: async (token, messageId, options) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.editFollowupMessage(token, messageId, options)))\n },\n editGlobalApplicationCommand: async (commandId, options) => {\n return bot.transformers.applicationCommand(bot, snakelize(await bot.rest.editGlobalApplicationCommand(commandId, options)))\n },\n editGuild: async (guildId, options, reason) => {\n return bot.transformers.guild(bot, { guild: snakelize(await bot.rest.editGuild(guildId, options, reason)), shardId: 0 })\n },\n editGuildApplicationCommand: async (commandId, guildId, options) => {\n return bot.transformers.applicationCommand(bot, snakelize(await bot.rest.editGuildApplicationCommand(commandId, guildId, options)))\n },\n editGuildSticker: async (guildId, stickerId, options, reason) => {\n return bot.transformers.sticker(bot, snakelize(await bot.rest.editGuildSticker(guildId, stickerId, options, reason)))\n },\n editGuildTemplate: async (guildId, templateCode, options) => {\n return bot.transformers.template(bot, snakelize(await bot.rest.editGuildTemplate(guildId, templateCode, options)))\n },\n editMessage: async (channelId, messageId, options) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.editMessage(channelId, messageId, options)) as DiscordMessage)\n },\n editOriginalInteractionResponse: async (token, options) => {\n const result = await bot.rest.editOriginalInteractionResponse(token, options)\n if (!result) return\n\n return bot.transformers.message(bot, snakelize(result) as DiscordMessage)\n },\n editOriginalWebhookMessage: async (webhookId, token, options) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.editOriginalWebhookMessage(webhookId, token, options)) as DiscordMessage)\n },\n editRole: async (guildId, roleId, options, reason) => {\n return bot.transformers.role(bot, { role: snakelize(await bot.rest.editRole(guildId, roleId, options, reason)), guildId })\n },\n editRolePositions: async (guildId, options, reason) => {\n return snakelize(await bot.rest.editRolePositions(guildId, options, reason)).map((role) => bot.transformers.role(bot, { role, guildId }))\n },\n editScheduledEvent: async (guildId, eventId, options, reason) => {\n return bot.transformers.scheduledEvent(bot, snakelize(await bot.rest.editScheduledEvent(guildId, eventId, options, reason)))\n },\n editStageInstance: async (channelId, topic, reason) => {\n return bot.transformers.stageInstance(bot, snakelize(await bot.rest.editStageInstance(channelId, topic, reason)))\n },\n editWebhook: async (webhookId, options, reason) => {\n return bot.transformers.webhook(bot, snakelize(await bot.rest.editWebhook(webhookId, options, reason)))\n },\n editWebhookMessage: async (webhookId, token, messageId, options) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.editWebhookMessage(webhookId, token, messageId, options)) as DiscordMessage)\n },\n editWebhookWithToken: async (webhookId, token, options) => {\n return bot.transformers.webhook(bot, snakelize(await bot.rest.editWebhookWithToken(webhookId, token, options)))\n },\n editWelcomeScreen: async (guildId, options, reason) => {\n return bot.transformers.welcomeScreen(bot, snakelize(await bot.rest.editWelcomeScreen(guildId, options, reason)))\n },\n editWidgetSettings: async (guildId, options, reason) => {\n return bot.transformers.widgetSettings(bot, snakelize(await bot.rest.editWidgetSettings(guildId, options, reason)))\n },\n executeWebhook: async (webhookId, token, options) => {\n const result = await bot.rest.executeWebhook(webhookId, token, options)\n if (!result) return\n\n return bot.transformers.message(bot, snakelize(result) as DiscordMessage)\n },\n followAnnouncement: async (sourceChannelId, targetChannelId) => {\n return await bot.rest.followAnnouncement(sourceChannelId, targetChannelId)\n },\n getActiveThreads: async (guildId) => {\n return await bot.rest.getActiveThreads(guildId)\n },\n getApplicationInfo: async () => {\n return bot.transformers.application(bot, snakelize(await bot.rest.getApplicationInfo()))\n },\n getApplicationCommandPermission: async (guildId, commandId) => {\n return bot.transformers.applicationCommandPermission(bot, snakelize(await bot.rest.getApplicationCommandPermission(guildId, commandId)))\n },\n getApplicationCommandPermissions: async (guildId) => {\n return (await bot.rest.getApplicationCommandPermissions(guildId)).map((res) =>\n bot.transformers.applicationCommandPermission(bot, snakelize(res)),\n )\n },\n getAuditLog: async (guildId, options) => {\n return await bot.rest.getAuditLog(guildId, options)\n },\n getAutomodRule: async (guildId, ruleId) => {\n return bot.transformers.automodRule(bot, snakelize(await bot.rest.getAutomodRule(guildId, ruleId)))\n },\n getAutomodRules: async (guildId) => {\n return (await bot.rest.getAutomodRules(guildId)).map((res) => bot.transformers.automodRule(bot, snakelize(res)))\n },\n getAvailableVoiceRegions: async () => {\n return (await bot.rest.getAvailableVoiceRegions()).map((res) => bot.transformers.voiceRegion(bot, snakelize(res)))\n },\n getBan: async (guildId, userId) => {\n return await bot.rest.getBan(guildId, userId)\n },\n getBans: async (guildId, options) => {\n return await bot.rest.getBans(guildId, options)\n },\n getChannel: async (channelId) => {\n return bot.transformers.channel(bot, { channel: snakelize(await bot.rest.getChannel(channelId)) })\n },\n getChannelInvites: async (channelId) => {\n return await bot.rest.getChannelInvites(channelId)\n // return (await bot.rest.getChannelInvites(channelId)).map((res) => bot.transformers.invite(bot, snakelize(res)))\n },\n getChannels: async (guildId) => {\n return (await bot.rest.getChannels(guildId)).map((res) => bot.transformers.channel(bot, { channel: snakelize(res), guildId }))\n },\n getChannelWebhooks: async (channelId) => {\n return (await bot.rest.getChannelWebhooks(channelId)).map((res) => bot.transformers.webhook(bot, snakelize(res)))\n },\n getDmChannel: async (userId) => {\n return bot.transformers.channel(bot, { channel: snakelize(await bot.rest.getDmChannel(userId)) })\n },\n getEmoji: async (guildId, emojiId) => {\n return bot.transformers.emoji(bot, snakelize(await bot.rest.getEmoji(guildId, emojiId)))\n },\n getEmojis: async (guildId) => {\n return (await bot.rest.getEmojis(guildId)).map((res) => bot.transformers.emoji(bot, snakelize(res)))\n },\n getFollowupMessage: async (token, messageId) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.getFollowupMessage(token, messageId)))\n },\n getGatewayBot: async () => {\n return bot.transformers.gatewayBot(snakelize(await bot.rest.getGatewayBot()))\n },\n getGlobalApplicationCommand: async (commandId) => {\n return bot.transformers.applicationCommand(bot, snakelize(await bot.rest.getGlobalApplicationCommand(commandId)))\n },\n getGlobalApplicationCommands: async () => {\n return (await bot.rest.getGlobalApplicationCommands()).map((res) => bot.transformers.applicationCommand(bot, snakelize(res)))\n },\n getGuild: async (guildId, options) => {\n return bot.transformers.guild(bot, { guild: snakelize(await bot.rest.getGuild(guildId, options)), shardId: 0 })\n },\n getGuildApplicationCommand: async (commandId, guildId) => {\n return bot.transformers.applicationCommand(bot, snakelize(await bot.rest.getGuildApplicationCommand(commandId, guildId)))\n },\n getGuildApplicationCommands: async (guildId) => {\n return (await bot.rest.getGuildApplicationCommands(guildId)).map((res) => bot.transformers.applicationCommand(bot, snakelize(res)))\n },\n getGuildPreview: async (guildId) => {\n return await bot.rest.getGuildPreview(guildId)\n // return bot.transformers.xxx(bot, snakelize(await bot.rest.getGuildPreview(guildId)))\n },\n getGuildSticker: async (guildId, stickerId) => {\n return bot.transformers.sticker(bot, snakelize(await bot.rest.getGuildSticker(guildId, stickerId)))\n },\n getGuildStickers: async (guildId) => {\n return (await bot.rest.getGuildStickers(guildId)).map((res) => bot.transformers.sticker(bot, snakelize(res)))\n },\n getGuildTemplate: async (templateCode) => {\n return bot.transformers.template(bot, snakelize(await bot.rest.getGuildTemplate(templateCode)))\n },\n getGuildTemplates: async (guildId) => {\n return (await bot.rest.getGuildTemplates(guildId)).map((res) => bot.transformers.template(bot, snakelize(res)))\n },\n getGuildWebhooks: async (guildId) => {\n return (await bot.rest.getGuildWebhooks(guildId)).map((res) => bot.transformers.webhook(bot, snakelize(res)))\n },\n getIntegrations: async (guildId) => {\n return (await bot.rest.getIntegrations(guildId)).map((res) =>\n bot.transformers.integration(bot, snakelize({ ...res, guildId: guildId.toString() })),\n )\n },\n getInvite: async (inviteCode, options) => {\n return await bot.rest.getInvite(inviteCode, options)\n // return bot.transformers.invite(bot, snakelize(await bot.rest.getInvite(inviteCode, options)))\n },\n getInvites: async (guildId) => {\n return await bot.rest.getInvites(guildId)\n // .map((res) => bot.transformers.invite(bot, snakelize(res)))\n },\n getMessage: async (channelId, messageId) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.getMessage(channelId, messageId)))\n },\n getMessages: async (channelId, options) => {\n return (await bot.rest.getMessages(channelId, options)).map((res) => bot.transformers.message(bot, snakelize(res)))\n },\n getNitroStickerPacks: async () => {\n return (await bot.rest.getNitroStickerPacks()).map((res) => bot.transformers.stickerPack(bot, snakelize(res)))\n },\n getOriginalInteractionResponse: async (token) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.getOriginalInteractionResponse(token)))\n },\n getPinnedMessages: async (channelId) => {\n return (await bot.rest.getPinnedMessages(channelId)).map((res) => bot.transformers.message(bot, snakelize(res)))\n },\n getPrivateArchivedThreads: async (channelId, options) => {\n return await bot.rest.getPrivateArchivedThreads(channelId, options)\n // return bot.transformers.xxx(bot, snakelize(await bot.rest.getPrivateArchivedThreads(channelId, options)))\n },\n getPrivateJoinedArchivedThreads: async (channelId, options) => {\n return await bot.rest.getPrivateJoinedArchivedThreads(channelId, options)\n // return bot.transformers.xxx(bot, snakelize(await bot.rest.getPrivateJoinedArchivedThreads(channelId, options)))\n },\n getPruneCount: async (guildId, options) => {\n return await bot.rest.getPruneCount(guildId, options)\n // return bot.transformers.xxx(bot, snakelize(await bot.rest.getPruneCount(guildId, options)))\n },\n getPublicArchivedThreads: async (channelId, options) => {\n return await bot.rest.getPublicArchivedThreads(channelId, options)\n // return bot.transformers.xxx(bot, snakelize(await bot.rest.getPublicArchivedThreads(channelId, options)))\n },\n getRoles: async (guildId) => {\n return snakelize(await bot.rest.getRoles(guildId)).map((role) => bot.transformers.role(bot, { role, guildId }))\n },\n getScheduledEvent: async (guildId, eventId, options) => {\n return bot.transformers.scheduledEvent(bot, snakelize(await bot.rest.getScheduledEvent(guildId, eventId, options)))\n },\n getScheduledEvents: async (guildId, options) => {\n return (await bot.rest.getScheduledEvents(guildId, options)).map((res) => bot.transformers.scheduledEvent(bot, snakelize(res)))\n },\n getScheduledEventUsers: async (guildId, eventId, options) => {\n return (await bot.rest.getScheduledEventUsers(guildId, eventId, options)).map((u) => {\n return {\n user: bot.transformers.user(bot, snakelize(u.user)),\n member: u.member && bot.transformers.member(bot, snakelize(u.member), guildId, bot.transformers.snowflake(u.user.id)),\n }\n })\n },\n getSessionInfo: async () => {\n return bot.transformers.gatewayBot(snakelize(await bot.rest.getSessionInfo()))\n },\n getStageInstance: async (channelId) => {\n return bot.transformers.stageInstance(bot, snakelize(await bot.rest.getStageInstance(channelId)))\n },\n getSticker: async (stickerId) => {\n return bot.transformers.sticker(bot, snakelize(await bot.rest.getSticker(stickerId)))\n },\n getThreadMember: async (channelId, userId) => {\n return bot.transformers.threadMember(bot, snakelize(await bot.rest.getThreadMember(channelId, userId)))\n },\n getThreadMembers: async (channelId) => {\n return (await bot.rest.getThreadMembers(channelId)).map((res) => bot.transformers.threadMember(bot, snakelize(res)))\n },\n getReactions: async (channelId, messageId, reaction, options) => {\n return (await bot.rest.getReactions(channelId, messageId, reaction, options)).map((res) => bot.transformers.user(bot, snakelize(res)))\n },\n getUser: async (id) => {\n return bot.transformers.user(bot, snakelize(await bot.rest.getUser(id)))\n },\n getVanityUrl: async (guildId) => {\n return await bot.rest.getVanityUrl(guildId)\n },\n getVoiceRegions: async (guildId) => {\n return (await bot.rest.getVoiceRegions(guildId)).map((res) => bot.transformers.voiceRegion(bot, snakelize(res)))\n },\n getWebhook: async (webhookId) => {\n return bot.transformers.webhook(bot, snakelize(await bot.rest.getWebhook(webhookId)))\n },\n getWebhookMessage: async (webhookId, token, messageId, options) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.getWebhookMessage(webhookId, token, messageId, options)))\n },\n getWebhookWithToken: async (webhookId, token) => {\n return bot.transformers.webhook(bot, snakelize(await bot.rest.getWebhookWithToken(webhookId, token)))\n },\n getWelcomeScreen: async (guildId) => {\n return bot.transformers.welcomeScreen(bot, snakelize(await bot.rest.getWelcomeScreen(guildId)))\n },\n getWidget: async (guildId) => {\n return bot.transformers.widget(bot, snakelize(await bot.rest.getWidget(guildId)))\n },\n getWidgetSettings: async (guildId) => {\n return bot.transformers.widgetSettings(bot, snakelize(await bot.rest.getWidgetSettings(guildId)))\n },\n publishMessage: async (channelId, messageId) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.publishMessage(channelId, messageId)))\n },\n sendMessage: async (channelId, options) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.sendMessage(channelId, options)))\n },\n sendFollowupMessage: async (token, options) => {\n return bot.transformers.message(bot, snakelize(await bot.rest.sendFollowupMessage(token, options)))\n },\n startThreadWithMessage: async (channelId, messageId, options, reason) => {\n return bot.transformers.channel(bot, {\n channel: snakelize(await bot.rest.startThreadWithMessage(channelId, messageId, options, reason)),\n })\n },\n startThreadWithoutMessage: async (channelId, options, reason) => {\n return bot.transformers.channel(bot, { channel: snakelize(await bot.rest.startThreadWithoutMessage(channelId, options, reason)) })\n },\n syncGuildTemplate: async (guildId) => {\n return bot.transformers.template(bot, snakelize(await bot.rest.syncGuildTemplate(guildId)))\n },\n upsertGlobalApplicationCommands: async (commands) => {\n return (await bot.rest.upsertGlobalApplicationCommands(commands)).map((res) => bot.transformers.applicationCommand(bot, snakelize(res)))\n },\n upsertGuildApplicationCommands: async (guildId, commands) => {\n return (await bot.rest.upsertGuildApplicationCommands(guildId, commands)).map((res) => bot.transformers.applicationCommand(bot, snakelize(res)))\n },\n editBotMember: async (guildId, options, reason) => {\n return bot.transformers.member(bot, snakelize(await bot.rest.editBotMember(guildId, options, reason)), guildId, bot.id)\n },\n editMember: async (guildId, userId, options, reason) => {\n return bot.transformers.member(bot, snakelize(await bot.rest.editMember(guildId, userId, options, reason)), guildId, userId)\n },\n getMember: async (guildId, userId) => {\n return bot.transformers.member(bot, snakelize(await bot.rest.getMember(guildId, userId)), guildId, userId)\n },\n getMembers: async (guildId, options) => {\n return (await bot.rest.getMembers(guildId, options)).map((res) =>\n bot.transformers.member(bot, snakelize(res), guildId, bot.transformers.snowflake(res.user.id)),\n )\n },\n pruneMembers: async (guildId, options, reason) => {\n return await bot.rest.pruneMembers(guildId, options, reason)\n },\n searchMembers: async (guildId, query, options) => {\n return (await bot.rest.searchMembers(guildId, query, options)).map((res) =>\n bot.transformers.member(bot, snakelize(res), guildId, bot.transformers.snowflake(res.user.id)),\n )\n },\n // All useless void return functions here\n addReaction: async (channelId, messageId, reaction) => {\n return await bot.rest.addReaction(channelId, messageId, reaction)\n },\n addReactions: async (channelId, messageId, reactions, ordered) => {\n return await bot.rest.addReactions(channelId, messageId, reactions, ordered)\n },\n addRole: async (guildId, userId, roleId, reason) => {\n return await bot.rest.addRole(guildId, userId, roleId, reason)\n },\n addThreadMember: async (channelId, userId) => {\n return await bot.rest.addThreadMember(channelId, userId)\n },\n deleteAutomodRule: async (guildId, ruleId, reason) => {\n return await bot.rest.deleteAutomodRule(guildId, ruleId, reason)\n },\n deleteChannel: async (channelId, reason) => {\n return await bot.rest.deleteChannel(channelId, reason)\n },\n deleteChannelPermissionOverride: async (channelId, overwriteId, reason) => {\n return await bot.rest.deleteChannelPermissionOverride(channelId, overwriteId, reason)\n },\n deleteEmoji: async (guildId, id, reason) => {\n return await bot.rest.deleteEmoji(guildId, id, reason)\n },\n deleteFollowupMessage: async (token, messageId) => {\n return await bot.rest.deleteFollowupMessage(token, messageId)\n },\n deleteGlobalApplicationCommand: async (commandId) => {\n return await bot.rest.deleteGlobalApplicationCommand(commandId)\n },\n deleteGuild: async (guildId) => {\n return await bot.rest.deleteGuild(guildId)\n },\n deleteGuildApplicationCommand: async (commandId, guildId) => {\n return await bot.rest.deleteGuildApplicationCommand(commandId, guildId)\n },\n deleteGuildSticker: async (guildId, stickerId, reason) => {\n return await bot.rest.deleteGuildSticker(guildId, stickerId, reason)\n },\n deleteGuildTemplate: async (guildId, templateCode) => {\n return await bot.rest.deleteGuildTemplate(guildId, templateCode)\n },\n deleteIntegration: async (guildId, integrationId, reason) => {\n return await bot.rest.deleteIntegration(guildId, integrationId, reason)\n },\n deleteInvite: async (inviteCode, reason) => {\n return await bot.rest.deleteInvite(inviteCode, reason)\n },\n deleteMessage: async (channelId, messageId, reason) => {\n return await bot.rest.deleteMessage(channelId, messageId, reason)\n },\n deleteMessages: async (channelId, messageIds, reason) => {\n return await bot.rest.deleteMessages(channelId, messageIds, reason)\n },\n deleteOriginalInteractionResponse: async (token) => {\n return await bot.rest.deleteOriginalInteractionResponse(token)\n },\n deleteOwnReaction: async (channelId, messageId, reaction) => {\n return await bot.rest.deleteOwnReaction(channelId, messageId, reaction)\n },\n deleteReactionsAll: async (channelId, messageId) => {\n return await bot.rest.deleteReactionsAll(channelId, messageId)\n },\n deleteReactionsEmoji: async (channelId, messageId, reaction) => {\n return await bot.rest.deleteReactionsEmoji(channelId, messageId, reaction)\n },\n deleteRole: async (guildId, roleId, reason) => {\n return await bot.rest.deleteRole(guildId, roleId, reason)\n },\n deleteScheduledEvent: async (guildId, eventId) => {\n return await bot.rest.deleteScheduledEvent(guildId, eventId)\n },\n deleteStageInstance: async (channelId, reason) => {\n return await bot.rest.deleteStageInstance(channelId, reason)\n },\n deleteUserReaction: async (channelId, messageId, userId, reaction) => {\n return await bot.rest.deleteUserReaction(channelId, messageId, userId, reaction)\n },\n deleteWebhook: async (webhookId, reason) => {\n return await bot.rest.deleteWebhook(webhookId, reason)\n },\n deleteWebhookMessage: async (webhookId, token, messageId, options) => {\n return await bot.rest.deleteWebhookMessage(webhookId, token, messageId, options)\n },\n deleteWebhookWithToken: async (webhookId, token) => {\n return await bot.rest.deleteWebhookWithToken(webhookId, token)\n },\n editChannelPermissionOverrides: async (channelId, options, reason) => {\n return await bot.rest.editChannelPermissionOverrides(channelId, options, reason)\n },\n editChannelPositions: async (guildId, channelPositions) => {\n return await bot.rest.editChannelPositions(guildId, channelPositions)\n },\n editGuildMfaLevel: async (guildId, mfaLevel, reason) => {\n return await bot.rest.editGuildMfaLevel(guildId, mfaLevel, reason)\n },\n editOwnVoiceState: async (guildId, options) => {\n return await bot.rest.editOwnVoiceState(guildId, options)\n },\n editUserVoiceState: async (guildId, options) => {\n return await bot.rest.editUserVoiceState(guildId, options)\n },\n joinThread: async (channelId) => {\n return await bot.rest.joinThread(channelId)\n },\n leaveGuild: async (guildId) => {\n return await bot.rest.leaveGuild(guildId)\n },\n leaveThread: async (channelId) => {\n return await bot.rest.leaveThread(channelId)\n },\n removeRole: async (guildId, userId, roleId, reason) => {\n return await bot.rest.removeRole(guildId, userId, roleId, reason)\n },\n removeThreadMember: async (channelId, userId) => {\n return await bot.rest.removeThreadMember(channelId, userId)\n },\n sendInteractionResponse: async (interactionId, token, options) => {\n return await bot.rest.sendInteractionResponse(interactionId, token, options)\n },\n triggerTypingIndicator: async (channelId) => {\n return await bot.rest.triggerTypingIndicator(channelId)\n },\n banMember: async (guildId, userId, options, reason) => {\n return await bot.rest.banMember(guildId, userId, options, reason)\n },\n kickMember: async (guildId, userId, reason) => {\n return await bot.rest.kickMember(guildId, userId, reason)\n },\n pinMessage: async (channelId, messageId, reason) => {\n return await bot.rest.pinMessage(channelId, messageId, reason)\n },\n unbanMember: async (guildId, userId, reason) => {\n return await bot.rest.unbanMember(guildId, userId, reason)\n },\n unpinMessage: async (channelId, messageId, reason) => {\n return await bot.rest.unpinMessage(channelId, messageId, reason)\n },\n }\n}\n\nexport interface BotHelpers {\n createAutomodRule: (guildId: BigString, options: CreateAutoModerationRuleOptions, reason?: string) => Promise<AutoModerationRule>\n createChannel: (guildId: BigString, options: CreateGuildChannel, reason?: string) => Promise<Channel>\n createEmoji: (guildId: BigString, options: CreateGuildEmoji, reason?: string) => Promise<Emoji>\n createForumThread: (channelId: BigString, options: CreateForumPostWithMessage, reason?: string) => Promise<Channel>\n createGlobalApplicationCommand: (command: CreateApplicationCommand) => Promise<ApplicationCommand>\n createGuild: (options: CreateGuild) => Promise<Guild>\n createGuildApplicationCommand: (command: CreateApplicationCommand, guildId: BigString) => Promise<ApplicationCommand>\n createGuildFromTemplate: (templateCode: string, options: CreateGuildFromTemplate) => Promise<Guild>\n createGuildSticker: (guildId: BigString, options: CreateGuildStickerOptions, reason?: string) => Promise<Sticker>\n createGuildTemplate: (guildId: BigString, options: CreateTemplate) => Promise<Template>\n createInvite: (channelId: BigString, options?: CreateChannelInvite, reason?: string) => Promise<CamelizedDiscordInvite>\n createRole: (guildId: BigString, options: CreateGuildRole, reason?: string) => Promise<Role>\n createScheduledEvent: (guildId: BigString, options: CreateScheduledEvent, reason?: string) => Promise<ScheduledEvent>\n createStageInstance: (options: CreateStageInstance, reason?: string) => Promise<StageInstance>\n createWebhook: (channelId: BigString, options: CreateWebhook, reason?: string) => Promise<Webhook>\n editApplicationCommandPermissions: (\n guildId: BigString,\n commandId: BigString,\n bearerToken: string,\n options: ApplicationCommandPermissions[],\n ) => Promise<ApplicationCommandPermission>\n editAutomodRule: (\n guildId: BigString,\n ruleId: BigString,\n options: Partial<EditAutoModerationRuleOptions>,\n reason?: string,\n ) => Promise<AutoModerationRule>\n editBotProfile: (options: { username?: string; botAvatarURL?: string | null }) => Promise<User>\n editChannel: (channelId: BigString, options: ModifyChannel, reason?: string) => Promise<Channel>\n editEmoji: (guildId: BigString, id: BigString, options: ModifyGuildEmoji, reason?: string) => Promise<Emoji>\n editFollowupMessage: (token: string, messageId: BigString, options: InteractionCallbackData) => Promise<Message>\n editGlobalApplicationCommand: (commandId: BigString, options: CreateApplicationCommand) => Promise<ApplicationCommand>\n editGuild: (guildId: BigString, options: ModifyGuild, reason?: string) => Promise<Guild>\n editGuildApplicationCommand: (commandId: BigString, guildId: BigString, options: CreateApplicationCommand) => Promise<ApplicationCommand>\n editGuildSticker: (guildId: BigString, stickerId: BigString, options: AtLeastOne<EditGuildStickerOptions>, reason?: string) => Promise<Sticker>\n editGuildTemplate: (guildId: BigString, templateCode: string, options: ModifyGuildTemplate) => Promise<Template>\n editMessage: (channelId: BigString, messageId: BigString, options: EditMessage) => Promise<Message>\n editOriginalInteractionResponse: (token: string, options: InteractionCallbackData) => Promise<Message | undefined>\n editOriginalWebhookMessage: (webhookId: BigString, token: string, options: InteractionCallbackData & { threadId?: BigString }) => Promise<Message>\n editRole: (guildId: BigString, roleId: BigString, options: EditGuildRole, reason?: string) => Promise<Role>\n editRolePositions: (guildId: BigString, options: ModifyRolePositions[], reason?: string) => Promise<Role[]>\n editScheduledEvent: (guildId: BigString, eventId: BigString, options: Partial<EditScheduledEvent>, reason?: string) => Promise<ScheduledEvent>\n editStageInstance: (channelId: BigString, topic: string, reason?: string) => Promise<StageInstance>\n editWebhook: (webhookId: BigString, options: ModifyWebhook, reason?: string) => Promise<Webhook>\n editWebhookMessage: (\n webhookId: BigString,\n token: string,\n messageId: BigString,\n options: InteractionCallbackData & { threadId?: BigString },\n ) => Promise<Message>\n editWebhookWithToken: (webhookId: BigString, token: string, options: Omit<ModifyWebhook, 'channelId'>) => Promise<Webhook>\n editWelcomeScreen: (guildId: BigString, options: CamelizedDiscordModifyGuildWelcomeScreen, reason?: string) => Promise<WelcomeScreen>\n editWidgetSettings: (guildId: BigString, options: CamelizedDiscordGuildWidgetSettings, reason?: string) => Promise<GuildWidgetSettings>\n executeWebhook: (webhookId: BigString, token: string, options: ExecuteWebhook) => Promise<Message | undefined>\n followAnnouncement: (sourceChannelId: BigString, targetChannelId: BigString) => Promise<CamelizedDiscordFollowedChannel>\n getActiveThreads: (guildId: BigString) => Promise<CamelizedDiscordActiveThreads>\n getApplicationInfo: () => Promise<Application>\n getApplicationCommandPermission: (guildId: BigString, commandId: BigString) => Promise<ApplicationCommandPermission>\n getApplicationCommandPermissions: (guildId: BigString) => Promise<ApplicationCommandPermission[]>\n getAuditLog: (guildId: BigString, options?: GetGuildAuditLog) => Promise<CamelizedDiscordAuditLog>\n getAutomodRule: (guildId: BigString, ruleId: BigString) => Promise<AutoModerationRule>\n getAutomodRules: (guildId: BigString) => Promise<AutoModerationRule[]>\n getAvailableVoiceRegions: () => Promise<CamelizedDiscordVoiceRegion[]>\n getBan: (guildId: BigString, userId: BigString) => Promise<CamelizedDiscordBan>\n getBans: (guildId: BigString, options?: GetBans) => Promise<CamelizedDiscordBan[]>\n getChannel: (channelId: BigString) => Promise<Channel>\n getChannelInvites: (channelId: BigString) => Promise<CamelizedDiscordInviteMetadata[]>\n getChannels: (guildId: BigString) => Promise<Channel[]>\n getChannelWebhooks: (channelId: BigString) => Promise<Webhook[]>\n getDmChannel: (userId: BigString) => Promise<Channel>\n getEmoji: (guildId: BigString, emojiId: BigString) => Promise<Emoji>\n getEmojis: (guildId: BigString) => Promise<Emoji[]>\n getFollowupMessage: (token: string, messageId: BigString) => Promise<Message>\n getGatewayBot: () => Promise<CamelizedDiscordGetGatewayBot>\n getGlobalApplicationCommand: (commandId: BigString) => Promise<ApplicationCommand>\n getGlobalApplicationCommands: () => Promise<ApplicationCommand[]>\n getGuild: (guildId: BigString, options?: { counts?: boolean }) => Promise<Guild>\n getGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<ApplicationCommand>\n getGuildApplicationCommands: (guildId: BigString) => Promise<ApplicationCommand[]>\n getGuildPreview: (guildId: BigString) => Promise<CamelizedDiscordGuildPreview>\n getGuildSticker: (guildId: BigString, stickerId: BigString) => Promise<Sticker>\n getGuildStickers: (guildId: BigString) => Promise<Sticker[]>\n getGuildTemplate: (templateCode: string) => Promise<Template>\n getGuildTemplates: (guildId: BigString) => Promise<Template[]>\n getGuildWebhooks: (guildId: BigString) => Promise<Webhook[]>\n getIntegrations: (guildId: BigString) => Promise<Integration[]>\n getInvite: (inviteCode: string, options?: GetInvite) => Promise<CamelizedDiscordInviteMetadata>\n getInvites: (guildId: BigString) => Promise<CamelizedDiscordInviteMetadata[]>\n getMessage: (channelId: BigString, messageId: BigString) => Promise<Message>\n getMessages: (channelId: BigString, options?: GetMessagesOptions) => Promise<Message[]>\n getNitroStickerPacks: () => Promise<StickerPack[]>\n getOriginalInteractionResponse: (token: string) => Promise<Message>\n getPinnedMessages: (channelId: BigString) => Promise<Message[]>\n getPrivateArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>\n getPrivateJoinedArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>\n getPruneCount: (guildId: BigString, options?: GetGuildPruneCountQuery) => Promise<CamelizedDiscordPrunedCount>\n getPublicArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>\n getRoles: (guildId: BigString) => Promise<Role[]>\n getScheduledEvent: (guildId: BigString, eventId: BigString, options?: { withUserCount?: boolean }) => Promise<ScheduledEvent>\n getScheduledEvents: (guildId: BigString, options?: GetScheduledEvents) => Promise<ScheduledEvent[]>\n getScheduledEventUsers: (\n guildId: BigString,\n eventId: BigString,\n options?: GetScheduledEventUsers,\n ) => Promise<Array<{ user: User; member?: Member }>>\n getSessionInfo: () => Promise<CamelizedDiscordGetGatewayBot>\n getStageInstance: (channelId: BigString) => Promise<StageInstance>\n getSticker: (stickerId: BigString) => Promise<Sticker>\n getThreadMember: (channelId: BigString, userId: BigString) => Promise<ThreadMember>\n getThreadMembers: (channelId: BigString) => Promise<ThreadMember[]>\n getReactions: (channelId: BigString, messageId: BigString, reaction: string, options?: GetReactions) => Promise<User[]>\n getUser: (id: BigString) => Promise<User>\n getVanityUrl: (guildId: BigString) => Promise<CamelizedDiscordVanityUrl>\n getVoiceRegions: (guildId: BigString) => Promise<CamelizedDiscordVoiceRegion[]>\n getWebhook: (webhookId: BigString) => Promise<Webhook>\n getWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: GetWebhookMessageOptions) => Promise<Message>\n getWebhookWithToken: (webhookId: BigString, token: string) => Promise<Webhook>\n getWelcomeScreen: (guildId: BigString) => Promise<WelcomeScreen>\n getWidget: (guildId: BigString) => Promise<GuildWidget>\n getWidgetSettings: (guildId: BigString) => Promise<GuildWidgetSettings>\n publishMessage: (channelId: BigString, messageId: BigString) => Promise<Message>\n sendMessage: (channelId: BigString, options: CreateMessageOptions) => Promise<Message>\n sendFollowupMessage: (token: string, options: InteractionCallbackData) => Promise<Message>\n startThreadWithMessage: (channelId: BigString, messageId: BigString, options: StartThreadWithMessage, reason?: string) => Promise<Channel>\n startThreadWithoutMessage: (channelId: BigString, options: StartThreadWithoutMessage, reason?: string) => Promise<Channel>\n syncGuildTemplate: (guildId: BigString) => Promise<Template>\n upsertGlobalApplicationCommands: (commands: CreateApplicationCommand[]) => Promise<ApplicationCommand[]>\n upsertGuildApplicationCommands: (guildId: BigString, commands: CreateApplicationCommand[]) => Promise<ApplicationCommand[]>\n editBotMember: (guildId: BigString, options: EditBotMemberOptions, reason?: string) => Promise<Member>\n editMember: (guildId: BigString, userId: BigString, options: ModifyGuildMember, reason?: string) => Promise<Member>\n getMember: (guildId: BigString, userId: BigString) => Promise<Member>\n getMembers: (guildId: BigString, options: ListGuildMembers) => Promise<Member[]>\n pruneMembers: (guildId: BigString, options: BeginGuildPrune, reason?: string) => Promise<{ pruned: number | null }>\n searchMembers: (guildId: BigString, query: string, options?: Omit<SearchMembers, 'query'>) => Promise<Member[]>\n // functions return Void so dont need any special handling\n addReaction: (channelId: BigString, messageId: BigString, reaction: string) => Promise<void>\n addReactions: (channelId: BigString, messageId: BigString, reactions: string[], ordered?: boolean) => Promise<void>\n addRole: (guildId: BigString, userId: BigString, roleId: BigString, reason?: string) => Promise<void>\n addThreadMember: (channelId: BigString, userId: BigString) => Promise<void>\n deleteAutomodRule: (guildId: BigString, ruleId: BigString, reason?: string) => Promise<void>\n deleteChannel: (channelId: BigString, reason?: string) => Promise<void>\n deleteChannelPermissionOverride: (channelId: BigString, overwriteId: BigString, reason?: string) => Promise<void>\n deleteEmoji: (guildId: BigString, id: BigString, reason?: string) => Promise<void>\n deleteFollowupMessage: (token: string, messageId: BigString) => Promise<void>\n deleteGlobalApplicationCommand: (commandId: BigString) => Promise<void>\n deleteGuild: (guildId: BigString) => Promise<void>\n deleteGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<void>\n deleteGuildSticker: (guildId: BigString, stickerId: BigString, reason?: string) => Promise<void>\n deleteGuildTemplate: (guildId: BigString, templateCode: string) => Promise<void>\n deleteIntegration: (guildId: BigString, integrationId: BigString, reason?: string) => Promise<void>\n deleteInvite: (inviteCode: string, reason?: string) => Promise<void>\n deleteMessage: (channelId: BigString, messageId: BigString, reason?: string) => Promise<void>\n deleteMessages: (channelId: BigString, messageIds: BigString[], reason?: string) => Promise<void>\n deleteOriginalInteractionResponse: (token: string) => Promise<void>\n deleteOwnReaction: (channelId: BigString, messageId: BigString, reaction: string) => Promise<void>\n deleteReactionsAll: (channelId: BigString, messageId: BigString) => Promise<void>\n deleteReactionsEmoji: (channelId: BigString, messageId: BigString, reaction: string) => Promise<void>\n deleteRole: (guildId: BigString, roleId: BigString, reason?: string) => Promise<void>\n deleteScheduledEvent: (guildId: BigString, eventId: BigString) => Promise<void>\n deleteStageInstance: (channelId: BigString, reason?: string) => Promise<void>\n deleteUserReaction: (channelId: BigString, messageId: BigString, userId: BigString, reaction: string) => Promise<void>\n deleteWebhook: (webhookId: BigString, reason?: string) => Promise<void>\n deleteWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: DeleteWebhookMessageOptions) => Promise<void>\n deleteWebhookWithToken: (webhookId: BigString, token: string) => Promise<void>\n editChannelPermissionOverrides: (channelId: BigString, options: EditChannelPermissionOverridesOptions, reason?: string) => Promise<void>\n editChannelPositions: (guildId: BigString, channelPositions: ModifyGuildChannelPositions[]) => Promise<void>\n editGuildMfaLevel: (guildId: BigString, mfaLevel: MfaLevels, reason?: string) => Promise<void>\n editOwnVoiceState: (guildId: BigString, options: EditOwnVoiceState) => Promise<void>\n editUserVoiceState: (guildId: BigString, options: EditUserVoiceState) => Promise<void>\n joinThread: (channelId: BigString) => Promise<void>\n leaveGuild: (guildId: BigString) => Promise<void>\n leaveThread: (channelId: BigString) => Promise<void>\n removeRole: (guildId: BigString, userId: BigString, roleId: BigString, reason?: string) => Promise<void>\n removeThreadMember: (channelId: BigString, userId: BigString) => Promise<void>\n sendInteractionResponse: (interactionId: BigString, token: string, options: InteractionResponse) => Promise<void>\n triggerTypingIndicator: (channelId: BigString) => Promise<void>\n banMember: (guildId: BigString, userId: BigString, options?: CreateGuildBan, reason?: string) => Promise<void>\n kickMember: (guildId: BigString, userId: BigString, reason?: string) => Promise<void>\n pinMessage: (channelId: BigString, messageId: BigString, reason?: string) => Promise<void>\n unbanMember: (guildId: BigString, userId: BigString, reason?: string) => Promise<void>\n unpinMessage: (channelId: BigString, messageId: BigString, reason?: string) => Promise<void>\n}\n"],"names":["snakelize","createBotHelpers","bot","createAutomodRule","guildId","options","reason","transformers","automodRule","rest","createChannel","channel","createEmoji","emoji","createForumThread","channelId","createGlobalApplicationCommand","command","applicationCommand","createGuild","guild","shardId","createGuildApplicationCommand","createGuildFromTemplate","templateCode","createGuildSticker","sticker","createGuildTemplate","template","createInvite","createRole","role","createScheduledEvent","scheduledEvent","createStageInstance","stageInstance","createWebhook","webhook","editApplicationCommandPermissions","commandId","bearerToken","applicationCommandPermission","editAutomodRule","ruleId","editBotProfile","user","editChannel","editEmoji","id","editFollowupMessage","token","messageId","message","editGlobalApplicationCommand","editGuild","editGuildApplicationCommand","editGuildSticker","stickerId","editGuildTemplate","editMessage","editOriginalInteractionResponse","result","editOriginalWebhookMessage","webhookId","editRole","roleId","editRolePositions","map","editScheduledEvent","eventId","editStageInstance","topic","editWebhook","editWebhookMessage","editWebhookWithToken","editWelcomeScreen","welcomeScreen","editWidgetSettings","widgetSettings","executeWebhook","followAnnouncement","sourceChannelId","targetChannelId","getActiveThreads","getApplicationInfo","application","getApplicationCommandPermission","getApplicationCommandPermissions","res","getAuditLog","getAutomodRule","getAutomodRules","getAvailableVoiceRegions","voiceRegion","getBan","userId","getBans","getChannel","getChannelInvites","getChannels","getChannelWebhooks","getDmChannel","getEmoji","emojiId","getEmojis","getFollowupMessage","getGatewayBot","gatewayBot","getGlobalApplicationCommand","getGlobalApplicationCommands","getGuild","getGuildApplicationCommand","getGuildApplicationCommands","getGuildPreview","getGuildSticker","getGuildStickers","getGuildTemplate","getGuildTemplates","getGuildWebhooks","getIntegrations","integration","toString","getInvite","inviteCode","getInvites","getMessage","getMessages","getNitroStickerPacks","stickerPack","getOriginalInteractionResponse","getPinnedMessages","getPrivateArchivedThreads","getPrivateJoinedArchivedThreads","getPruneCount","getPublicArchivedThreads","getRoles","getScheduledEvent","getScheduledEvents","getScheduledEventUsers","u","member","snowflake","getSessionInfo","getStageInstance","getSticker","getThreadMember","threadMember","getThreadMembers","getReactions","reaction","getUser","getVanityUrl","getVoiceRegions","getWebhook","getWebhookMessage","getWebhookWithToken","getWelcomeScreen","getWidget","widget","getWidgetSettings","publishMessage","sendMessage","sendFollowupMessage","startThreadWithMessage","startThreadWithoutMessage","syncGuildTemplate","upsertGlobalApplicationCommands","commands","upsertGuildApplicationCommands","editBotMember","editMember","getMember","getMembers","pruneMembers","searchMembers","query","addReaction","addReactions","reactions","ordered","addRole","addThreadMember","deleteAutomodRule","deleteChannel","deleteChannelPermissionOverride","overwriteId","deleteEmoji","deleteFollowupMessage","deleteGlobalApplicationCommand","deleteGuild","deleteGuildApplicationCommand","deleteGuildSticker","deleteGuildTemplate","deleteIntegration","integrationId","deleteInvite","deleteMessage","deleteMessages","messageIds","deleteOriginalInteractionResponse","deleteOwnReaction","deleteReactionsAll","deleteReactionsEmoji","deleteRole","deleteScheduledEvent","deleteStageInstance","deleteUserReaction","deleteWebhook","deleteWebhookMessage","deleteWebhookWithToken","editChannelPermissionOverrides","editChannelPositions","channelPositions","editGuildMfaLevel","mfaLevel","editOwnVoiceState","editUserVoiceState","joinThread","leaveGuild","leaveThread","removeRole","removeThreadMember","sendInteractionResponse","interactionId","triggerTypingIndicator","banMember","kickMember","pinMessage","unbanMember","unpinMessage"],"mappings":"AAyEA,SAASA,SAAS,QAAQ,oBAAmB;AAwB7C,OAAO,SAASC,iBAAiBC,GAAQ,EAAc;IACrD,OAAO;QACLC,mBAAmB,OAAOC,SAASC,SAASC,SAAW;YACrD,OAAOJ,IAAIK,YAAY,CAACC,WAAW,CAACN,KAAKF,UAAU,MAAME,IAAIO,IAAI,CAACN,iBAAiB,CAACC,SAASC,SAASC;QACxG;QACAI,eAAe,OAAON,SAASC,SAASC,SAAW;YACjD,OAAOJ,IAAIK,YAAY,CAACI,OAAO,CAACT,KAAK;gBAAES,SAASX,UAAU,MAAME,IAAIO,IAAI,CAACC,aAAa,CAACN,SAASC,SAASC;gBAAUF;YAAQ;QAC7H;QACAQ,aAAa,OAAOR,SAASC,SAASC,SAAW;YAC/C,OAAOJ,IAAIK,YAAY,CAACM,KAAK,CAACX,KAAKF,UAAU,MAAME,IAAIO,IAAI,CAACG,WAAW,CAACR,SAASC,SAASC;QAC5F;QACAQ,mBAAmB,OAAOC,WAAWV,SAASC,SAAW;YACvD,OAAOJ,IAAIK,YAAY,CAACI,OAAO,CAACT,KAAK;gBAAES,SAASX,UAAU,MAAME,IAAIO,IAAI,CAACK,iBAAiB,CAACC,WAAWV,SAASC;YAAS;QAC1H;QACAU,gCAAgC,OAAOC,UAAY;YACjD,OAAOf,IAAIK,YAAY,CAACW,kBAAkB,CAAChB,KAAKF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jN,YAAc;YAC3C,OAAO,MAAMb,IAAIO,IAAI,CAACuN,sBAAsB,CAACjN;QAC/C;QACAkN,WAAW,OAAO7N,SAAS2F,QAAQ1F,SAASC,SAAW;YACrD,OAAO,MAAMJ,IAAIO,IAAI,CAACwN,SAAS,CAAC7N,SAAS2F,QAAQ1F,SAASC;QAC5D;QACA4N,YAAY,OAAO9N,SAAS2F,QAAQzF,SAAW;YAC7C,OAAO,MAAMJ,IAAIO,IAAI,CAACyN,UAAU,CAAC9N,SAAS2F,QAAQzF;QACpD;QACA6N,YAAY,OAAOpN,WAAWoC,WAAW7C,SAAW;YAClD,OAAO,MAAMJ,IAAIO,IAAI,CAAC0N,UAAU,CAACpN,WAAWoC,WAAW7C;QACzD;QACA8N,aAAa,OAAOhO,SAAS2F,QAAQzF,SAAW;YAC9C,OAAO,MAAMJ,IAAIO,IAAI,CAAC2N,WAAW,CAAChO,SAAS2F,QAAQzF;QACrD;QACA+N,cAAc,OAAOtN,WAAWoC,WAAW7C,SAAW;YACpD,OAAO,MAAMJ,IAAIO,IAAI,CAAC4N,YAAY,CAACtN,WAAWoC,WAAW7C;QAC3D;IACF;AACF,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,9 +3,13 @@ export * from '@discordeno/rest';
|
|
|
3
3
|
export * from '@discordeno/types';
|
|
4
4
|
export * from '@discordeno/utils';
|
|
5
5
|
export * from './bot.js';
|
|
6
|
+
export * from './constants.js';
|
|
6
7
|
export * from './handlers/index.js';
|
|
7
8
|
export * from './handlers.js';
|
|
9
|
+
export * from './helpers.js';
|
|
10
|
+
export * from './optionalize.js';
|
|
8
11
|
export * from './transformers/index.js';
|
|
9
12
|
export * from './transformers.js';
|
|
13
|
+
export * from './typings.js';
|
|
10
14
|
export * from './utils.js';
|
|
11
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,UAAU,CAAA;AACxB,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -3,10 +3,14 @@ export * from '@discordeno/rest';
|
|
|
3
3
|
export * from '@discordeno/types';
|
|
4
4
|
export * from '@discordeno/utils';
|
|
5
5
|
export * from './bot.js';
|
|
6
|
+
export * from './constants.js';
|
|
6
7
|
export * from './handlers/index.js';
|
|
7
8
|
export * from './handlers.js';
|
|
9
|
+
export * from './helpers.js';
|
|
10
|
+
export * from './optionalize.js';
|
|
8
11
|
export * from './transformers/index.js';
|
|
9
12
|
export * from './transformers.js';
|
|
13
|
+
export * from './typings.js';
|
|
10
14
|
export * from './utils.js';
|
|
11
15
|
|
|
12
16
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from '@discordeno/gateway'\nexport * from '@discordeno/rest'\nexport * from '@discordeno/types'\nexport * from '@discordeno/utils'\nexport * from './bot.js'\nexport * from './handlers/index.js'\nexport * from './handlers.js'\nexport * from './transformers/index.js'\nexport * from './transformers.js'\nexport * from './utils.js'\n"],"names":[],"mappings":"AAAA,cAAc,sBAAqB;AACnC,cAAc,mBAAkB;AAChC,cAAc,oBAAmB;AACjC,cAAc,oBAAmB;AACjC,cAAc,WAAU;AACxB,cAAc,sBAAqB;AACnC,cAAc,gBAAe;AAC7B,cAAc,0BAAyB;AACvC,cAAc,oBAAmB;AACjC,cAAc,aAAY"}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from '@discordeno/gateway'\nexport * from '@discordeno/rest'\nexport * from '@discordeno/types'\nexport * from '@discordeno/utils'\nexport * from './bot.js'\nexport * from './constants.js'\nexport * from './handlers/index.js'\nexport * from './handlers.js'\nexport * from './helpers.js'\nexport * from './optionalize.js'\nexport * from './transformers/index.js'\nexport * from './transformers.js'\nexport * from './typings.js'\nexport * from './utils.js'\n"],"names":[],"mappings":"AAAA,cAAc,sBAAqB;AACnC,cAAc,mBAAkB;AAChC,cAAc,oBAAmB;AACjC,cAAc,oBAAmB;AACjC,cAAc,WAAU;AACxB,cAAc,iBAAgB;AAC9B,cAAc,sBAAqB;AACnC,cAAc,gBAAe;AAC7B,cAAc,eAAc;AAC5B,cAAc,mBAAkB;AAChC,cAAc,0BAAyB;AACvC,cAAc,oBAAmB;AACjC,cAAc,eAAc;AAC5B,cAAc,aAAY"}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import type { Bot, DiscordActivity } from '../index.js';
|
|
2
2
|
export declare function transformActivity(bot: Bot, payload: DiscordActivity): {
|
|
3
3
|
join?: string | undefined;
|
|
4
|
-
|
|
5
|
-
url?: string | undefined;
|
|
6
|
-
startedAt?: number | undefined;
|
|
7
|
-
endedAt?: number | undefined;
|
|
4
|
+
flags?: number | undefined;
|
|
8
5
|
applicationId?: bigint | undefined;
|
|
9
|
-
|
|
10
|
-
state?: string | undefined;
|
|
6
|
+
url?: string | undefined;
|
|
11
7
|
emoji?: {
|
|
12
8
|
id?: bigint | undefined;
|
|
13
9
|
animated?: boolean | undefined;
|
|
14
10
|
name: string;
|
|
15
11
|
} | undefined;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
partyMaxSize?: number | undefined;
|
|
19
|
-
largeImage?: string | undefined;
|
|
20
|
-
largeText?: string | undefined;
|
|
21
|
-
smallImage?: string | undefined;
|
|
22
|
-
smallText?: string | undefined;
|
|
23
|
-
match?: string | undefined;
|
|
12
|
+
details?: string | undefined;
|
|
13
|
+
state?: string | undefined;
|
|
24
14
|
instance?: boolean | undefined;
|
|
25
|
-
flags?: number | undefined;
|
|
26
15
|
buttons?: {
|
|
27
16
|
url: string;
|
|
28
17
|
label: string;
|
|
29
18
|
}[] | undefined;
|
|
19
|
+
largeText?: string | undefined;
|
|
20
|
+
smallText?: string | undefined;
|
|
21
|
+
largeImage?: string | undefined;
|
|
22
|
+
smallImage?: string | undefined;
|
|
23
|
+
spectate?: string | undefined;
|
|
24
|
+
match?: string | undefined;
|
|
25
|
+
partyId?: string | undefined;
|
|
26
|
+
startedAt?: number | undefined;
|
|
27
|
+
endedAt?: number | undefined;
|
|
28
|
+
partyCurrentSize?: number | undefined;
|
|
29
|
+
partyMaxSize?: number | undefined;
|
|
30
30
|
name: string;
|
|
31
31
|
type: import("@discordeno/types/dist/shared.js").ActivityTypes;
|
|
32
32
|
createdAt: number;
|
|
@@ -9,6 +9,7 @@ export declare function transformApplication(bot: Bot, payload: DiscordApplicati
|
|
|
9
9
|
slug?: string | undefined;
|
|
10
10
|
coverImage?: bigint | undefined;
|
|
11
11
|
owner?: {
|
|
12
|
+
locale?: string | undefined;
|
|
12
13
|
flags?: {
|
|
13
14
|
bitfield: number;
|
|
14
15
|
contains: (bits: number) => boolean;
|
|
@@ -16,7 +17,6 @@ export declare function transformApplication(bot: Bot, payload: DiscordApplicati
|
|
|
16
17
|
remove: (bits: number) => import("./toggles/ToggleBitfield.js").ToggleBitfield;
|
|
17
18
|
toJSON: () => number;
|
|
18
19
|
} | undefined;
|
|
19
|
-
locale?: string | undefined;
|
|
20
20
|
avatar?: bigint | undefined;
|
|
21
21
|
email?: string | undefined;
|
|
22
22
|
banner?: bigint | undefined;
|
|
@@ -26,8 +26,8 @@ export declare function transformApplication(bot: Bot, payload: DiscordApplicati
|
|
|
26
26
|
verified: boolean;
|
|
27
27
|
mfaEnabled: boolean;
|
|
28
28
|
bitfield: number;
|
|
29
|
-
has: (permissions: "bot" | "system" | "verified" | "mfaEnabled" | ("bot" | "system" | "verified" | "mfaEnabled")[]) => boolean;
|
|
30
29
|
list: () => Record<"bot" | "system" | "verified" | "mfaEnabled", boolean>;
|
|
30
|
+
has: (permissions: "bot" | "system" | "verified" | "mfaEnabled" | ("bot" | "system" | "verified" | "mfaEnabled")[]) => boolean;
|
|
31
31
|
contains: (bits: number) => boolean;
|
|
32
32
|
add: (bits: number) => import("./toggles/user.js").UserToggles;
|
|
33
33
|
remove: (bits: number) => import("./toggles/user.js").UserToggles;
|
|
@@ -42,8 +42,8 @@ export declare function transformApplication(bot: Bot, payload: DiscordApplicati
|
|
|
42
42
|
toJSON: () => number;
|
|
43
43
|
} | undefined;
|
|
44
44
|
accentColor?: number | undefined;
|
|
45
|
-
id: bigint;
|
|
46
45
|
username: string;
|
|
46
|
+
id: bigint;
|
|
47
47
|
discriminator: string;
|
|
48
48
|
bot: boolean;
|
|
49
49
|
system: boolean;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { DiscordApplicationCommand } from '@discordeno/types';
|
|
2
2
|
import type { Bot } from '../index.js';
|
|
3
3
|
export declare function transformApplicationCommand(bot: Bot, payload: DiscordApplicationCommand): {
|
|
4
|
-
type?: import("@discordeno/types").ApplicationCommandTypes | undefined;
|
|
5
4
|
description?: string | undefined;
|
|
6
5
|
guildId?: bigint | undefined;
|
|
7
6
|
nameLocalizations?: {
|
|
@@ -69,6 +68,7 @@ export declare function transformApplicationCommand(bot: Bot, payload: DiscordAp
|
|
|
69
68
|
ko?: string | undefined;
|
|
70
69
|
} | undefined;
|
|
71
70
|
defaultMemberPermissions?: bigint | undefined;
|
|
71
|
+
type?: import("@discordeno/types").ApplicationCommandTypes | undefined;
|
|
72
72
|
version?: string | undefined;
|
|
73
73
|
options?: {
|
|
74
74
|
nameLocalizations?: {
|
|
@@ -173,15 +173,15 @@ export declare function transformApplicationCommand(bot: Bot, payload: DiscordAp
|
|
|
173
173
|
name: string;
|
|
174
174
|
value: string | number;
|
|
175
175
|
}[] | undefined;
|
|
176
|
+
autocomplete?: boolean | undefined;
|
|
176
177
|
channelTypes?: import("@discordeno/types").ChannelTypes[] | undefined;
|
|
177
178
|
minValue?: number | undefined;
|
|
178
179
|
maxValue?: number | undefined;
|
|
179
180
|
minLength?: number | undefined;
|
|
180
181
|
maxLength?: number | undefined;
|
|
181
|
-
autocomplete?: boolean | undefined;
|
|
182
182
|
name: string;
|
|
183
|
-
type: import("@discordeno/types").ApplicationCommandOptionTypes;
|
|
184
183
|
description: string;
|
|
184
|
+
type: import("@discordeno/types").ApplicationCommandOptionTypes;
|
|
185
185
|
}[] | undefined;
|
|
186
186
|
id: bigint;
|
|
187
187
|
name: string;
|
|
@@ -2,8 +2,8 @@ import type { DiscordGuildApplicationCommandPermissions } from '@discordeno/type
|
|
|
2
2
|
import type { Bot } from '../index.js';
|
|
3
3
|
export declare function transformApplicationCommandPermission(bot: Bot, payload: DiscordGuildApplicationCommandPermissions): {
|
|
4
4
|
id: bigint;
|
|
5
|
-
applicationId: bigint;
|
|
6
5
|
guildId: bigint;
|
|
6
|
+
applicationId: bigint;
|
|
7
7
|
permissions: {
|
|
8
8
|
id: bigint;
|
|
9
9
|
type: import("@discordeno/types").ApplicationCommandPermissionTypes;
|
|
@@ -2,15 +2,15 @@ import type { DiscordAttachment } from '@discordeno/types';
|
|
|
2
2
|
import type { Bot } from '../index.js';
|
|
3
3
|
export declare function transformAttachment(bot: Bot, payload: DiscordAttachment): {
|
|
4
4
|
description?: string | undefined;
|
|
5
|
-
contentType?: string | undefined;
|
|
6
5
|
height?: number | undefined;
|
|
7
6
|
width?: number | undefined;
|
|
7
|
+
contentType?: string | undefined;
|
|
8
8
|
ephemeral?: boolean | undefined;
|
|
9
9
|
id: bigint;
|
|
10
|
-
size: number;
|
|
11
10
|
url: string;
|
|
12
|
-
filename: string;
|
|
13
11
|
proxyUrl: string;
|
|
12
|
+
filename: string;
|
|
13
|
+
size: number;
|
|
14
14
|
};
|
|
15
15
|
export interface Attachment extends ReturnType<typeof transformAttachment> {
|
|
16
16
|
}
|
|
@@ -13,15 +13,17 @@ export declare function transformAuditLogEntry(bot: Bot, payload: DiscordAuditLo
|
|
|
13
13
|
autoModerationRuleName: string;
|
|
14
14
|
autoModerationRuleTriggerType: string;
|
|
15
15
|
} | undefined;
|
|
16
|
+
userId?: bigint | undefined;
|
|
17
|
+
reason?: string | undefined;
|
|
16
18
|
changes?: {
|
|
17
19
|
new?: string | number | bigint | boolean | {
|
|
18
|
-
id?: bigint | undefined;
|
|
19
|
-
name?: string | undefined;
|
|
20
|
-
}[] | {
|
|
21
20
|
allow?: string | undefined;
|
|
22
21
|
deny?: string | undefined;
|
|
23
22
|
id: string;
|
|
24
23
|
type: import("@discordeno/types").OverwriteTypes;
|
|
24
|
+
}[] | {
|
|
25
|
+
id?: bigint | undefined;
|
|
26
|
+
name?: string | undefined;
|
|
25
27
|
}[] | undefined;
|
|
26
28
|
old?: string | number | bigint | boolean | {
|
|
27
29
|
allow?: string | undefined;
|
|
@@ -32,11 +34,9 @@ export declare function transformAuditLogEntry(bot: Bot, payload: DiscordAuditLo
|
|
|
32
34
|
id?: bigint | undefined;
|
|
33
35
|
name?: string | undefined;
|
|
34
36
|
}[] | undefined;
|
|
35
|
-
key: "id" | "name" | "
|
|
37
|
+
key: "id" | "name" | "description" | "type" | "permissions" | "locked" | "invitable" | "nsfw" | "archived" | "position" | "topic" | "bitrate" | "default_auto_archive_duration" | "auto_archive_duration" | "allow" | "deny" | "channel_id" | "deaf" | "mute" | "nick" | "communication_disabled_until" | "color" | "permission_overwrites" | "user_limit" | "rate_limit_per_user" | "owner_id" | "application_id" | "hoist" | "mentionable" | "status" | "location" | "verification_level" | "default_message_notifications" | "explicit_content_filter" | "preferred_locale" | "afk_timeout" | "afk_channel_id" | "system_channel_id" | "widget_enabled" | "mfa_level" | "vanity_url_code" | "icon_hash" | "widget_channel_id" | "rules_channel_id" | "public_updates_channel_id" | "code" | "region" | "privacy_level" | "entity_type" | "enable_emoticons" | "expire_behavior" | "expire_grace_period" | "uses" | "max_uses" | "max_age" | "temporary" | "discovery_splash_hash" | "banner_hash" | "image_hash" | "splash_hash" | "inviter_id" | "avatar_hash" | "command_id" | "prune_delete_days" | "$add" | "$remove";
|
|
36
38
|
}[] | undefined;
|
|
37
|
-
userId?: bigint | undefined;
|
|
38
39
|
targetId?: bigint | undefined;
|
|
39
|
-
reason?: string | undefined;
|
|
40
40
|
id: bigint;
|
|
41
41
|
actionType: import("@discordeno/types").AuditLogEvents;
|
|
42
42
|
};
|
|
@@ -7,18 +7,18 @@ export declare function transformAutoModerationActionExecution(bot: Bot, payload
|
|
|
7
7
|
guildId: bigint;
|
|
8
8
|
userId: bigint;
|
|
9
9
|
content: string;
|
|
10
|
-
ruleTriggerType: import("@discordeno/types").AutoModerationTriggerTypes;
|
|
11
|
-
ruleId: bigint;
|
|
12
|
-
matchedKeyword: string;
|
|
13
|
-
matchedContent: string;
|
|
14
10
|
action: {
|
|
15
11
|
type: import("@discordeno/types").AutoModerationActionType;
|
|
16
12
|
metadata: {
|
|
17
|
-
channelId?: bigint | undefined;
|
|
18
13
|
customMessage?: string | undefined;
|
|
19
14
|
durationSeconds?: number | undefined;
|
|
15
|
+
channelId?: bigint | undefined;
|
|
20
16
|
};
|
|
21
17
|
};
|
|
18
|
+
ruleTriggerType: import("@discordeno/types").AutoModerationTriggerTypes;
|
|
19
|
+
ruleId: bigint;
|
|
20
|
+
matchedKeyword: string;
|
|
21
|
+
matchedContent: string;
|
|
22
22
|
};
|
|
23
23
|
export interface AutoModerationActionExecution extends ReturnType<typeof transformAutoModerationActionExecution> {
|
|
24
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChannelTypes, DiscordChannel, DiscordThreadMember, OverwriteReadable, VideoQualityModes } from '@discordeno/types';
|
|
1
|
+
import type { BigString, ChannelTypes, DiscordChannel, DiscordThreadMember, OverwriteReadable, VideoQualityModes } from '@discordeno/types';
|
|
2
2
|
import { type Bot } from '../index.js';
|
|
3
3
|
import { Permissions } from './toggles/Permissions.js';
|
|
4
4
|
import { ChannelToggles } from './toggles/channel.js';
|
|
@@ -8,7 +8,7 @@ export declare const baseChannel: Partial<Channel> & BaseChannel;
|
|
|
8
8
|
export declare function transformChannel(bot: Bot, payload: {
|
|
9
9
|
channel: DiscordChannel;
|
|
10
10
|
} & {
|
|
11
|
-
guildId?:
|
|
11
|
+
guildId?: BigString;
|
|
12
12
|
}): Channel;
|
|
13
13
|
export interface BaseChannel {
|
|
14
14
|
/** Whether the channel is nsfw */
|
|
@@ -65,7 +65,7 @@ export interface Channel extends BaseChannel {
|
|
|
65
65
|
/** Id of the creator of the thread */
|
|
66
66
|
ownerId?: bigint;
|
|
67
67
|
/** For guild channels: Id of the parent category for a channel (each parent category can contain up to 50 channels), for threads: id of the text channel this thread was created */
|
|
68
|
-
parentId?:
|
|
68
|
+
parentId?: bigint;
|
|
69
69
|
/** When the last pinned message was pinned. This may be null in events such as GUILD_CREATE when a message is not pinned. */
|
|
70
70
|
lastPinTimestamp?: string;
|
|
71
71
|
/** Voice region id for the voice or stage channel, automatic when set to null */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../src/transformers/channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,m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ACzE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,sBAAsB,CAAC,EAAE;QACvB,wGAAwG;QACxG,gBAAgB,EAAE,MAAM,CAAA;QACxB,iGAAiG;QACjG,eAAe,CAAC,EAAE,MAAM,CAAA;QACxB,oFAAoF;QACpF,mBAAmB,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAA;KAC9C,CAAA;IACD,wHAAwH;IACxH,MAAM,CAAC,EAAE,mBAAmB,CAAA;IAC5B,8JAA8J;IAC9J,6BAA6B,CAAC,EAAE,MAAM,CAAA;IACtC,kLAAkL;IAClL,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC9B"}
|
|
@@ -64,7 +64,7 @@ export function transformChannel(bot, payload) {
|
|
|
64
64
|
const props = bot.transformers.desiredProperties.channel;
|
|
65
65
|
channel.toggles = new ChannelToggles(payload.channel);
|
|
66
66
|
if (payload.channel.id && props.id) channel.id = bot.transformers.snowflake(payload.channel.id);
|
|
67
|
-
if (payload.guildId && props.guildId) channel.guildId = payload.guildId;
|
|
67
|
+
if ((payload.guildId ?? payload.channel.guild_id) && props.guildId) channel.guildId = payload.guildId ?? bot.transformers.snowflake(payload.channel.guild_id);
|
|
68
68
|
if (props.type) channel.type = payload.channel.type;
|
|
69
69
|
if (props.position) channel.position = payload.channel.position;
|
|
70
70
|
if (payload.channel.name && props.name) channel.name = payload.channel.name;
|
|
@@ -91,6 +91,7 @@ export function transformChannel(bot, payload) {
|
|
|
91
91
|
if (payload.channel.permission_overwrites && props.permissionOverwrites) {
|
|
92
92
|
channel.internalOverwrites = payload.channel.permission_overwrites.map((o)=>packOverwrites(o.allow ?? '0', o.deny ?? '0', o.id, o.type));
|
|
93
93
|
}
|
|
94
|
+
if (props.parentId && payload.channel.parent_id) channel.parentId = bot.transformers.snowflake(payload.channel.parent_id);
|
|
94
95
|
return bot.transformers.customizers.channel(bot, payload.channel, channel);
|
|
95
96
|
}
|
|
96
97
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/transformers/channel.ts"],"sourcesContent":["import type { ChannelTypes, DiscordChannel, DiscordThreadMember, OverwriteReadable, VideoQualityModes } from '@discordeno/types'\nimport { calculatePermissions, type Bot } from '../index.js'\nimport { Permissions } from './toggles/Permissions.js'\nimport { ChannelToggles } from './toggles/channel.js'\n\nconst Mask = (1n << 64n) - 1n\n\nexport function packOverwrites(allow: string, deny: string, id: string, type: number): bigint {\n return pack64(allow, 0) | pack64(deny, 1) | pack64(id, 2) | pack64(type, 3)\n}\nfunction unpack64(v: bigint, shift: number): bigint {\n return (v >> BigInt(shift * 64)) & Mask\n}\nfunction pack64(v: string | number, shift: number): bigint {\n const b = BigInt(v)\n if (b < 0 || b > Mask) throw new Error('should have been a 64 bit unsigned integer: ' + v.toString())\n return b << BigInt(shift * 64)\n}\nexport function separateOverwrites(v: bigint): [number, bigint, bigint, bigint] {\n return [Number(unpack64(v, 3)), unpack64(v, 2), unpack64(v, 0), unpack64(v, 1)] as [number, bigint, bigint, bigint]\n}\n\nexport const baseChannel: Partial<Channel> & BaseChannel = {\n get archived() {\n return !!this.toggles?.archived\n },\n get invitable() {\n return !!this.toggles?.invitable\n },\n get locked() {\n return !!this.toggles?.locked\n },\n get nsfw() {\n return !!this.toggles?.nsfw\n },\n get newlyCreated() {\n return !!this.toggles?.newlyCreated\n },\n get permissionOverwrites() {\n return (\n this.internalOverwrites?.map((overwrite) => {\n const [type, id, allow, deny] = separateOverwrites(overwrite)\n return {\n type,\n id,\n allow: calculatePermissions(allow),\n deny: calculatePermissions(deny),\n }\n }) ?? []\n )\n },\n get threadMetadata() {\n return {\n archiveTimestamp: this.internalThreadMetadata?.archiveTimestamp,\n createTimestamp: this.internalThreadMetadata?.createTimestamp,\n autoArchiveDuration: this.internalThreadMetadata?.autoArchiveDuration,\n locked: this.locked,\n invitable: this.invitable,\n archived: this.archived,\n }\n },\n}\n\nexport function transformChannel(bot: Bot, payload: { channel: DiscordChannel } & { guildId?: bigint }): Channel {\n const channel = Object.create(baseChannel)\n const props = bot.transformers.desiredProperties.channel\n channel.toggles = new ChannelToggles(payload.channel)\n\n if (payload.channel.id && props.id) channel.id = bot.transformers.snowflake(payload.channel.id)\n if (payload.guildId && props.guildId) channel.guildId = payload.guildId\n if (props.type) channel.type = payload.channel.type\n if (props.position) channel.position = payload.channel.position\n if (payload.channel.name && props.name) channel.name = payload.channel.name\n if (payload.channel.topic && props.topic) channel.topic = payload.channel.topic\n if (payload.channel.last_message_id && props.lastMessageId) channel.lastMessageId = bot.transformers.snowflake(payload.channel.last_message_id)\n if (payload.channel.bitrate && props.bitrate) channel.bitrate = props.bitrate\n if (props.userLimit) channel.userLimit = payload.channel.user_limit\n if (props.rateLimitPerUser) channel.rateLimitPerUser = payload.channel.rate_limit_per_user\n if (payload.channel.owner_id && props.ownerId) channel.ownerId = bot.transformers.snowflake(payload.channel.owner_id)\n if (payload.channel.last_pin_timestamp && props.lastPinTimestamp) channel.lastPinTimestamp = Date.parse(payload.channel.last_pin_timestamp)\n if (payload.channel.rtc_region && props.rtcRegion) channel.rtcRegion = payload.channel.rtc_region\n if (payload.channel.video_quality_mode && props.videoQualityMode) channel.videoQualityMode = payload.channel.video_quality_mode\n if (payload.channel.message_count && props.messageCount) channel.messageCount = payload.channel.message_count\n if (payload.channel.member_count && props.memberCount) channel.memberCount = payload.channel.member_count\n if (props.archiveTimestamp || props.createTimestamp || props.autoArchiveDuration) {\n channel.internalThreadMetadata = {}\n if (payload.channel.thread_metadata?.archive_timestamp && props.archiveTimestamp)\n channel.internalThreadMetadata.archiveTimestamp = Date.parse(payload.channel.thread_metadata.archive_timestamp)\n if (payload.channel.thread_metadata?.create_timestamp && props.createTimestamp)\n channel.internalThreadMetadata.createTimestamp = Date.parse(payload.channel.thread_metadata.create_timestamp)\n if (payload.channel.thread_metadata?.auto_archive_duration && props.autoArchiveDuration)\n channel.internalThreadMetadata.autoArchiveDuration = payload.channel.thread_metadata.auto_archive_duration\n }\n if (payload.channel.default_auto_archive_duration && props.autoArchiveDuration)\n channel.autoArchiveDuration = payload.channel.default_auto_archive_duration\n if (payload.channel.permissions && props.permissions) channel.permissions = new Permissions(payload.channel.permissions)\n if (payload.channel.flags && props.flags) channel.flags = payload.channel.flags\n if (payload.channel.permission_overwrites && props.permissionOverwrites) {\n channel.internalOverwrites = payload.channel.permission_overwrites.map((o) => packOverwrites(o.allow ?? '0', o.deny ?? '0', o.id, o.type))\n }\n\n return bot.transformers.customizers.channel(bot, payload.channel, channel);\n}\n\nexport interface BaseChannel {\n /** Whether the channel is nsfw */\n nsfw: boolean\n /** Thread-specific fields not needed by other channels */\n threadMetadata?: {\n /** Timestamp when the thread's archive status was last changed, used for calculating recent activity */\n archiveTimestamp?: number\n /** Timestamp when the thread was created; only populated for threads created after 2022-01-09 */\n createTimestamp?: number\n /** Duration in minutes to automatically archive the thread after recent activity */\n autoArchiveDuration?: 60 | 1440 | 4320 | 10080\n /** When a thread is locked, only users with `MANAGE_THREADS` can unarchive it */\n locked: boolean\n /** whether non-moderators can add other non-moderators to a thread; only available on private threads */\n invitable: boolean\n /** Whether the thread is archived */\n archived: boolean\n }\n /** When a thread is created this will be true on that channel payload for the thread. */\n newlyCreated: boolean\n /** When a thread is locked, only users with `MANAGE_THREADS` can unarchive it */\n locked: boolean\n /** whether non-moderators can add other non-moderators to a thread; only available on private threads */\n invitable: boolean\n /** Whether the thread is archived */\n archived: boolean\n /** Explicit permission overwrites for members and roles. */\n permissionOverwrites: OverwriteReadable[]\n}\n\nexport interface Channel extends BaseChannel {\n /** The id of the channel */\n id: bigint\n /** The compressed form of all the boolean values on this channel. */\n toggles: ChannelToggles\n /** The type of channel */\n type: ChannelTypes\n /** The id of the guild */\n guildId?: bigint\n /** Sorting position of the channel */\n position?: number\n /** The name of the channel (1-100 characters) */\n name?: string\n /** The channel topic (0-4096 characters for GUILD_FORUM channels, 0-1024 characters for all others) */\n topic?: string\n /** The id of the last message sent in this channel (may not point to an existing or valid message) */\n lastMessageId?: bigint\n /** The bitrate (in bits) of the voice or stage channel */\n bitrate?: number\n /** The user limit of the voice or stage channel */\n userLimit?: number\n /** Amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission `manage_messages` or `manage_channel`, are unaffected */\n rateLimitPerUser?: number\n /** Id of the creator of the thread */\n ownerId?: bigint\n /** For guild channels: Id of the parent category for a channel (each parent category can contain up to 50 channels), for threads: id of the text channel this thread was created */\n parentId?: string\n /** When the last pinned message was pinned. This may be null in events such as GUILD_CREATE when a message is not pinned. */\n lastPinTimestamp?: string\n /** Voice region id for the voice or stage channel, automatic when set to null */\n rtcRegion?: string\n /** The camera video quality mode of the voice channel, 1 when not present */\n videoQualityMode?: VideoQualityModes\n /** An approximate count of messages in a thread, stops counting at 50 */\n messageCount?: number\n /** An approximate count of users in a thread, stops counting at 50 */\n memberCount?: number\n /**\n * Thread-specific fields not needed by other channels.\n * @deprecated Use channel.threadMetadata\n * @private This field is an internal field, subject to breaking changes.\n */\n internalThreadMetadata?: {\n /** Timestamp when the thread's archive status was last changed, used for calculating recent activity */\n archiveTimestamp: number\n /** Timestamp when the thread was created; only populated for threads created after 2022-01-09 */\n createTimestamp?: number\n /** Duration in minutes to automatically archive the thread after recent activity */\n autoArchiveDuration: 60 | 1440 | 4320 | 10080\n }\n /** Thread member object for the current user, if they have joined the thread, only included on certain API endpoints */\n member?: DiscordThreadMember\n /** Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 */\n default_auto_archive_duration?: number\n /** computed permissions for the invoking user in the channel, including overwrites, only included when part of the resolved data received on a application command interaction */\n permissions?: Permissions\n /** The flags of the channel */\n flags?: number\n /**\n * Explicit permission overwrites for members and roles\n * @deprecated Use channel.permissionOverwrites\n * @private This is for internal use only, and prone to breaking changes.\n */\n internalOverwrites?: bigint[]\n}\n"],"names":["calculatePermissions","Permissions","ChannelToggles","Mask","packOverwrites","allow","deny","id","type","pack64","unpack64","v","shift","BigInt","b","Error","toString","separateOverwrites","Number","baseChannel","archived","toggles","invitable","locked","nsfw","newlyCreated","permissionOverwrites","internalOverwrites","map","overwrite","threadMetadata","archiveTimestamp","internalThreadMetadata","createTimestamp","autoArchiveDuration","transformChannel","bot","payload","channel","Object","create","props","transformers","desiredProperties","snowflake","guildId","position","name","topic","last_message_id","lastMessageId","bitrate","userLimit","user_limit","rateLimitPerUser","rate_limit_per_user","owner_id","ownerId","last_pin_timestamp","lastPinTimestamp","Date","parse","rtc_region","rtcRegion","video_quality_mode","videoQualityMode","message_count","messageCount","member_count","memberCount","thread_metadata","archive_timestamp","create_timestamp","auto_archive_duration","default_auto_archive_duration","permissions","flags","permission_overwrites","o","customizers"],"mappings":"AACA,SAASA,oBAAoB,QAAkB,cAAa;AAC5D,SAASC,WAAW,QAAQ,2BAA0B;AACtD,SAASC,cAAc,QAAQ,uBAAsB;AAErD,MAAMC,OAAO,AAAC,CAAA,EAAE,IAAI,GAAG,AAAD,IAAK,EAAE;AAE7B,OAAO,SAASC,eAAeC,KAAa,EAAEC,IAAY,EAAEC,EAAU,EAAEC,IAAY,EAAU;IAC5F,OAAOC,OAAOJ,OAAO,KAAKI,OAAOH,MAAM,KAAKG,OAAOF,IAAI,KAAKE,OAAOD,MAAM;AAC3E,CAAC;AACD,SAASE,SAASC,CAAS,EAAEC,KAAa,EAAU;IAClD,OAAO,AAACD,KAAKE,OAAOD,QAAQ,MAAOT;AACrC;AACA,SAASM,OAAOE,CAAkB,EAAEC,KAAa,EAAU;IACzD,MAAME,IAAID,OAAOF;IACjB,IAAIG,IAAI,KAAKA,IAAIX,MAAM,MAAM,IAAIY,MAAM,iDAAiDJ,EAAEK,QAAQ,IAAG;IACrG,OAAOF,KAAKD,O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CAACgC,eAAe,EAAEG,yBAAyBhC,MAAMP,mBAAmB,EACrFI,QAAQN,sBAAsB,CAACE,mBAAmB,GAAGG,QAAQC,OAAO,CAACgC,eAAe,CAACG,qBAAqB;IAC9G,CAAC;IACD,IAAIpC,QAAQC,OAAO,CAACoC,6BAA6B,IAAIjC,MAAMP,mBAAmB,EAC5EI,QAAQJ,mBAAmB,GAAGG,QAAQC,OAAO,CAACoC,6BAA6B;IAC7E,IAAIrC,QAAQC,OAAO,CAACqC,WAAW,IAAIlC,MAAMkC,WAAW,EAAErC,QAAQqC,WAAW,GAAG,IAAI1E,YAAYoC,QAAQC,OAAO,CAACqC,WAAW;IACvH,IAAItC,QAAQC,OAAO,CAACsC,KAAK,IAAInC,MAAMmC,KAAK,EAAEtC,QAAQsC,KAAK,GAAGvC,QAAQC,OAAO,CAACsC,KAAK;IAC/E,IAAIvC,QAAQC,OAAO,CAACuC,qBAAqB,IAAIpC,MAAMf,oBAAoB,EAAE;QACvEY,QAAQX,kBAAkB,GAAGU,QAAQC,OAAO,CAACuC,qBAAqB,CAACjD,GAAG,CAAC,CAACkD,IAAM1E,eAAe0E,EAAEzE,KAAK,IAAI,KAAKyE,EAAExE,IAAI,IAAI,KAAKwE,EAAEvE,EAAE,EAAEuE,EAAEtE,IAAI;IAC1I,CAAC;IAED,OAAO4B,IAAIM,YAAY,CAACqC,WAAW,CAACzC,OAAO,CAACF,KAAKC,QAAQC,OAAO,EAAEA;AACpE,CAAC"}
|
|
1
|
+
{"version":3,"sources":["../../src/transformers/channel.ts"],"sourcesContent":["import type { BigString, ChannelTypes, DiscordChannel, DiscordThreadMember, OverwriteReadable, VideoQualityModes } from '@discordeno/types'\nimport { calculatePermissions, type Bot } from '../index.js'\nimport { Permissions } from './toggles/Permissions.js'\nimport { ChannelToggles } from './toggles/channel.js'\n\nconst Mask = (1n << 64n) - 1n\n\nexport function packOverwrites(allow: string, deny: string, id: string, type: number): bigint {\n return pack64(allow, 0) | pack64(deny, 1) | pack64(id, 2) | pack64(type, 3)\n}\nfunction unpack64(v: bigint, shift: number): bigint {\n return (v >> BigInt(shift * 64)) & Mask\n}\nfunction pack64(v: string | number, shift: number): bigint {\n const b = BigInt(v)\n if (b < 0 || b > Mask) throw new Error('should have been a 64 bit unsigned integer: ' + v.toString())\n return b << BigInt(shift * 64)\n}\nexport function separateOverwrites(v: bigint): [number, bigint, bigint, bigint] {\n return [Number(unpack64(v, 3)), unpack64(v, 2), unpack64(v, 0), unpack64(v, 1)] as [number, bigint, bigint, bigint]\n}\n\nexport const baseChannel: Partial<Channel> & BaseChannel = {\n get archived() {\n return !!this.toggles?.archived\n },\n get invitable() {\n return !!this.toggles?.invitable\n },\n get locked() {\n return !!this.toggles?.locked\n },\n get nsfw() {\n return !!this.toggles?.nsfw\n },\n get newlyCreated() {\n return !!this.toggles?.newlyCreated\n },\n get permissionOverwrites() {\n return (\n this.internalOverwrites?.map((overwrite) => {\n const [type, id, allow, deny] = separateOverwrites(overwrite)\n return {\n type,\n id,\n allow: calculatePermissions(allow),\n deny: calculatePermissions(deny),\n }\n }) ?? []\n )\n },\n get threadMetadata() {\n return {\n archiveTimestamp: this.internalThreadMetadata?.archiveTimestamp,\n createTimestamp: this.internalThreadMetadata?.createTimestamp,\n autoArchiveDuration: this.internalThreadMetadata?.autoArchiveDuration,\n locked: this.locked,\n invitable: this.invitable,\n archived: this.archived,\n }\n },\n}\n\nexport function transformChannel(bot: Bot, payload: { channel: DiscordChannel } & { guildId?: BigString }): Channel {\n const channel = Object.create(baseChannel)\n const props = bot.transformers.desiredProperties.channel\n channel.toggles = new ChannelToggles(payload.channel)\n\n if (payload.channel.id && props.id) channel.id = bot.transformers.snowflake(payload.channel.id)\n if ((payload.guildId ?? payload.channel.guild_id) && props.guildId) channel.guildId = payload.guildId ?? bot.transformers.snowflake(payload.channel.guild_id!)\n if (props.type) channel.type = payload.channel.type\n if (props.position) channel.position = payload.channel.position\n if (payload.channel.name && props.name) channel.name = payload.channel.name\n if (payload.channel.topic && props.topic) channel.topic = payload.channel.topic\n if (payload.channel.last_message_id && props.lastMessageId) channel.lastMessageId = bot.transformers.snowflake(payload.channel.last_message_id)\n if (payload.channel.bitrate && props.bitrate) channel.bitrate = props.bitrate\n if (props.userLimit) channel.userLimit = payload.channel.user_limit\n if (props.rateLimitPerUser) channel.rateLimitPerUser = payload.channel.rate_limit_per_user\n if (payload.channel.owner_id && props.ownerId) channel.ownerId = bot.transformers.snowflake(payload.channel.owner_id)\n if (payload.channel.last_pin_timestamp && props.lastPinTimestamp) channel.lastPinTimestamp = Date.parse(payload.channel.last_pin_timestamp)\n if (payload.channel.rtc_region && props.rtcRegion) channel.rtcRegion = payload.channel.rtc_region\n if (payload.channel.video_quality_mode && props.videoQualityMode) channel.videoQualityMode = payload.channel.video_quality_mode\n if (payload.channel.message_count && props.messageCount) channel.messageCount = payload.channel.message_count\n if (payload.channel.member_count && props.memberCount) channel.memberCount = payload.channel.member_count\n if (props.archiveTimestamp || props.createTimestamp || props.autoArchiveDuration) {\n channel.internalThreadMetadata = {}\n if (payload.channel.thread_metadata?.archive_timestamp && props.archiveTimestamp)\n channel.internalThreadMetadata.archiveTimestamp = Date.parse(payload.channel.thread_metadata.archive_timestamp)\n if (payload.channel.thread_metadata?.create_timestamp && props.createTimestamp)\n channel.internalThreadMetadata.createTimestamp = Date.parse(payload.channel.thread_metadata.create_timestamp)\n if (payload.channel.thread_metadata?.auto_archive_duration && props.autoArchiveDuration)\n channel.internalThreadMetadata.autoArchiveDuration = payload.channel.thread_metadata.auto_archive_duration\n }\n if (payload.channel.default_auto_archive_duration && props.autoArchiveDuration)\n channel.autoArchiveDuration = payload.channel.default_auto_archive_duration\n if (payload.channel.permissions && props.permissions) channel.permissions = new Permissions(payload.channel.permissions)\n if (payload.channel.flags && props.flags) channel.flags = payload.channel.flags\n if (payload.channel.permission_overwrites && props.permissionOverwrites) {\n channel.internalOverwrites = payload.channel.permission_overwrites.map((o) => packOverwrites(o.allow ?? '0', o.deny ?? '0', o.id, o.type))\n }\n if (props.parentId && payload.channel.parent_id) channel.parentId = bot.transformers.snowflake(payload.channel.parent_id);\n\n return bot.transformers.customizers.channel(bot, payload.channel, channel);\n}\n\nexport interface BaseChannel {\n /** Whether the channel is nsfw */\n nsfw: boolean\n /** Thread-specific fields not needed by other channels */\n threadMetadata?: {\n /** Timestamp when the thread's archive status was last changed, used for calculating recent activity */\n archiveTimestamp?: number\n /** Timestamp when the thread was created; only populated for threads created after 2022-01-09 */\n createTimestamp?: number\n /** Duration in minutes to automatically archive the thread after recent activity */\n autoArchiveDuration?: 60 | 1440 | 4320 | 10080\n /** When a thread is locked, only users with `MANAGE_THREADS` can unarchive it */\n locked: boolean\n /** whether non-moderators can add other non-moderators to a thread; only available on private threads */\n invitable: boolean\n /** Whether the thread is archived */\n archived: boolean\n }\n /** When a thread is created this will be true on that channel payload for the thread. */\n newlyCreated: boolean\n /** When a thread is locked, only users with `MANAGE_THREADS` can unarchive it */\n locked: boolean\n /** whether non-moderators can add other non-moderators to a thread; only available on private threads */\n invitable: boolean\n /** Whether the thread is archived */\n archived: boolean\n /** Explicit permission overwrites for members and roles. */\n permissionOverwrites: OverwriteReadable[]\n}\n\nexport interface Channel extends BaseChannel {\n /** The id of the channel */\n id: bigint\n /** The compressed form of all the boolean values on this channel. */\n toggles: ChannelToggles\n /** The type of channel */\n type: ChannelTypes\n /** The id of the guild */\n guildId?: bigint\n /** Sorting position of the channel */\n position?: number\n /** The name of the channel (1-100 characters) */\n name?: string\n /** The channel topic (0-4096 characters for GUILD_FORUM channels, 0-1024 characters for all others) */\n topic?: string\n /** The id of the last message sent in this channel (may not point to an existing or valid message) */\n lastMessageId?: bigint\n /** The bitrate (in bits) of the voice or stage channel */\n bitrate?: number\n /** The user limit of the voice or stage channel */\n userLimit?: number\n /** Amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission `manage_messages` or `manage_channel`, are unaffected */\n rateLimitPerUser?: number\n /** Id of the creator of the thread */\n ownerId?: bigint\n /** For guild channels: Id of the parent category for a channel (each parent category can contain up to 50 channels), for threads: id of the text channel this thread was created */\n parentId?: bigint\n /** When the last pinned message was pinned. This may be null in events such as GUILD_CREATE when a message is not pinned. */\n lastPinTimestamp?: string\n /** Voice region id for the voice or stage channel, automatic when set to null */\n rtcRegion?: string\n /** The camera video quality mode of the voice channel, 1 when not present */\n videoQualityMode?: VideoQualityModes\n /** An approximate count of messages in a thread, stops counting at 50 */\n messageCount?: number\n /** An approximate count of users in a thread, stops counting at 50 */\n memberCount?: number\n /**\n * Thread-specific fields not needed by other channels.\n * @deprecated Use channel.threadMetadata\n * @private This field is an internal field, subject to breaking changes.\n */\n internalThreadMetadata?: {\n /** Timestamp when the thread's archive status was last changed, used for calculating recent activity */\n archiveTimestamp: number\n /** Timestamp when the thread was created; only populated for threads created after 2022-01-09 */\n createTimestamp?: number\n /** Duration in minutes to automatically archive the thread after recent activity */\n autoArchiveDuration: 60 | 1440 | 4320 | 10080\n }\n /** Thread member object for the current user, if they have joined the thread, only included on certain API endpoints */\n member?: DiscordThreadMember\n /** Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 */\n default_auto_archive_duration?: number\n /** computed permissions for the invoking user in the channel, including overwrites, only included when part of the resolved data received on a application command interaction */\n permissions?: Permissions\n /** The flags of the channel */\n flags?: number\n /**\n * Explicit permission overwrites for members and roles\n * @deprecated Use channel.permissionOverwrites\n * @private This is for internal use only, and prone to breaking changes.\n */\n internalOverwrites?: bigint[]\n}\n"],"names":["calculatePermissions","Permissions","ChannelToggles","Mask","packOverwrites","allow","deny","id","type","pack64","unpack64","v","shift","BigInt","b","Error","toString","separateOverwrites","Number","baseChannel","archived","toggles","invitable","locked","nsfw","newlyCreated","permissionOverwrites","internalOverwrites","map","overwrite","threadMetadata","archiveTimestamp","internalThreadMetadata","createTimestamp","autoArchiveDuration","transformChannel","bot","payload","channel","Object","create","props","transformers","desiredProperties","snowflake","guildId","guild_id","position","name","topic","last_message_id","lastMessageId","bitrate","userLimit","user_limit","rateLimitPerUser","rate_limit_per_user","owner_id","ownerId","last_pin_timestamp","lastPinTimestamp","Date","parse","rtc_region","rtcRegion","video_quality_mode","videoQualityMode","message_count","messageCount","member_count","memberCount","thread_metadata","archive_timestamp","create_timestamp","auto_archive_duration","default_auto_archive_duration","permissions","flags","permission_overwrites","o","parentId","parent_id","customizers"],"mappings":"AACA,SAASA,oBAAoB,QAAkB,cAAa;AAC5D,SAASC,WAAW,QAAQ,2BAA0B;AACtD,SAASC,cAAc,QAAQ,uBAAsB;AAErD,MAAMC,OAAO,AAAC,CAAA,EAAE,IAAI,GAAG,AAAD,IAAK,EAAE;AAE7B,OAAO,SAASC,eAAeC,KAAa,EAAEC,IAAY,EAAEC,EAAU,EAAEC,IAAY,EAAU;IAC5F,OAAOC,OAAOJ,OAAO,KAAKI,OAAOH,MAAM,KAAKG,OAAOF,IAAI,KAAKE,OAAOD,MAAM;AAC3E,CAAC;AACD,SAASE,SAASC,CAAS,EAAEC,KAAa,EAAU;IAClD,OAAO,AAACD,KAAKE,OAAOD,QAAQ,MAAOT;AACrC;AACA,SAASM,OAAOE,CAAkB,EAAEC,KAAa,EAAU;IACzD,MAAME,IAAID,OAAOF;IACjB,IAAIG,IAAI,KAAKA,IAAIX,MAAM,MAAM,IAAIY,MAAM,iDAAiDJ,EAAEK,QAAQ,IAAG;IACrG,OAAOF,KAAKD,OAAOD,QAAQ;AAC7B;AACA,OAAO,SAASK,mBAAmBN,CAAS,EAAoC;IAC9E,OAAO;QAACO,OAAOR,SAASC,GAAG;QAAKD,SAASC,GAAG;QAAID,SAASC,GAAG;QAAID,SAASC,GAAG;KAAG;AACjF,CAAC;AAED,OAAO,MAAMQ,cAA8C;IACzD,IAAIC,YAAW;QACb,OAAO,CAAC,CAAC,IAAI,CAACC,OAAO,EAAED;IACzB;IACA,IAAIE,aAAY;QACd,OAAO,CAAC,CAAC,IAAI,CAACD,OAAO,EAAEC;IACzB;IACA,IAAIC,UAA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GG,QAAQC,OAAO,CAACqC,6BAA6B;IAC7E,IAAItC,QAAQC,OAAO,CAACsC,WAAW,IAAInC,MAAMmC,WAAW,EAAEtC,QAAQsC,WAAW,GAAG,IAAI3E,YAAYoC,QAAQC,OAAO,CAACsC,WAAW;IACvH,IAAIvC,QAAQC,OAAO,CAACuC,KAAK,IAAIpC,MAAMoC,KAAK,EAAEvC,QAAQuC,KAAK,GAAGxC,QAAQC,OAAO,CAACuC,KAAK;IAC/E,IAAIxC,QAAQC,OAAO,CAACwC,qBAAqB,IAAIrC,MAAMf,oBAAoB,EAAE;QACvEY,QAAQX,kBAAkB,GAAGU,QAAQC,OAAO,CAACwC,qBAAqB,CAAClD,GAAG,CAAC,CAACmD,IAAM3E,eAAe2E,EAAE1E,KAAK,IAAI,KAAK0E,EAAEzE,IAAI,IAAI,KAAKyE,EAAExE,EAAE,EAAEwE,EAAEvE,IAAI;IAC1I,CAAC;IACD,IAAIiC,MAAMuC,QAAQ,IAAI3C,QAAQC,OAAO,CAAC2C,SAAS,EAAE3C,QAAQ0C,QAAQ,GAAG5C,IAAIM,YAAY,CAACE,SAAS,CAACP,QAAQC,OAAO,CAAC2C,SAAS;IAExH,OAAO7C,IAAIM,YAAY,CAACwC,WAAW,CAAC5C,OAAO,CAACF,KAAKC,QAAQC,OAAO,EAAEA;AACpE,CAAC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { DiscordEmbed } from '@discordeno/types';
|
|
2
2
|
import type { Bot } from '../index.js';
|
|
3
3
|
export declare function transformEmbed(bot: Bot, payload: DiscordEmbed): {
|
|
4
|
-
type?: import("@discordeno/types").EmbedTypes | undefined;
|
|
5
|
-
url?: string | undefined;
|
|
6
4
|
description?: string | undefined;
|
|
7
|
-
|
|
5
|
+
type?: import("@discordeno/types").EmbedTypes | undefined;
|
|
8
6
|
image?: {
|
|
9
7
|
proxyUrl?: string | undefined;
|
|
10
8
|
height?: number | undefined;
|
|
@@ -18,7 +16,9 @@ export declare function transformEmbed(bot: Bot, payload: DiscordEmbed): {
|
|
|
18
16
|
width?: number | undefined;
|
|
19
17
|
} | undefined;
|
|
20
18
|
title?: string | undefined;
|
|
19
|
+
url?: string | undefined;
|
|
21
20
|
timestamp?: number | undefined;
|
|
21
|
+
color?: number | undefined;
|
|
22
22
|
footer?: {
|
|
23
23
|
iconUrl?: string | undefined;
|
|
24
24
|
proxyIconUrl?: string | undefined;
|