@erinjs/core 1.0.0 → 1.2.4
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/{core/LICENSE → LICENSE} +203 -203
- package/README.md +46 -0
- package/dist/index.d.mts +2084 -0
- package/dist/index.d.ts +2084 -0
- package/dist/index.js +3867 -0
- package/dist/index.mjs +3809 -0
- package/package.json +50 -15
- package/core/.changeset/README.md +0 -8
- package/core/.changeset/community-bootstrap-release.md +0 -17
- package/core/.changeset/config.json +0 -11
- package/core/.changeset/no-changelog.js +0 -16
- package/core/.changeset/pre.json +0 -17
- package/core/.editorconfig +0 -13
- package/core/.gitattributes +0 -2
- package/core/.github/CODE_OF_CONDUCT.md +0 -23
- package/core/.github/FUNDING.yml +0 -7
- package/core/.github/ISSUE_TEMPLATE/bug_report.md +0 -31
- package/core/.github/ISSUE_TEMPLATE/feature_request.md +0 -23
- package/core/.github/PULL_REQUEST_TEMPLATE.md +0 -16
- package/core/.github/dependabot.yml +0 -16
- package/core/.github/workflows/autoapp.yml +0 -16
- package/core/.github/workflows/ci.yml +0 -187
- package/core/.github/workflows/codeql.yml +0 -30
- package/core/.github/workflows/deploy-docs.yml +0 -54
- package/core/.github/workflows/publish.yml +0 -43
- package/core/.lintstagedrc.json +0 -4
- package/core/.nvmrc +0 -1
- package/core/.prettierignore +0 -8
- package/core/.prettierrc +0 -11
- package/core/CONTRIBUTING.md +0 -70
- package/core/README.md +0 -61
- package/core/SECURITY.md +0 -21
- package/core/apps/docs/index.html +0 -28
- package/core/apps/docs/middleware.ts +0 -21
- package/core/apps/docs/package.json +0 -33
- package/core/apps/docs/public/@flux.png +0 -0
- package/core/apps/docs/public/docs/latest/guides.json +0 -1420
- package/core/apps/docs/public/docs/latest/main.json +0 -14981
- package/core/apps/docs/public/docs/latest/rag-index.json +0 -1
- package/core/apps/docs/public/docs/v1.0.5/guides.json +0 -226
- package/core/apps/docs/public/docs/v1.0.5/main.json +0 -7920
- package/core/apps/docs/public/docs/v1.0.6/guides.json +0 -226
- package/core/apps/docs/public/docs/v1.0.6/main.json +0 -7920
- package/core/apps/docs/public/docs/v1.0.7/guides.json +0 -259
- package/core/apps/docs/public/docs/v1.0.7/main.json +0 -8652
- package/core/apps/docs/public/docs/v1.0.8/guides.json +0 -313
- package/core/apps/docs/public/docs/v1.0.8/main.json +0 -9618
- package/core/apps/docs/public/docs/v1.0.9/guides.json +0 -319
- package/core/apps/docs/public/docs/v1.0.9/main.json +0 -10694
- package/core/apps/docs/public/docs/v1.1.0/guides.json +0 -589
- package/core/apps/docs/public/docs/v1.1.0/main.json +0 -12576
- package/core/apps/docs/public/docs/v1.1.2/guides.json +0 -650
- package/core/apps/docs/public/docs/v1.1.2/main.json +0 -13239
- package/core/apps/docs/public/docs/v1.1.3/guides.json +0 -650
- package/core/apps/docs/public/docs/v1.1.3/main.json +0 -13239
- package/core/apps/docs/public/docs/v1.1.4/guides.json +0 -708
- package/core/apps/docs/public/docs/v1.1.4/main.json +0 -13231
- package/core/apps/docs/public/docs/v1.1.5/guides.json +0 -1035
- package/core/apps/docs/public/docs/v1.1.5/main.json +0 -13838
- package/core/apps/docs/public/docs/v1.1.6/guides.json +0 -1041
- package/core/apps/docs/public/docs/v1.1.6/main.json +0 -14313
- package/core/apps/docs/public/docs/v1.1.8/guides.json +0 -1047
- package/core/apps/docs/public/docs/v1.1.8/main.json +0 -14421
- package/core/apps/docs/public/docs/v1.1.9/guides.json +0 -1047
- package/core/apps/docs/public/docs/v1.1.9/main.json +0 -14421
- package/core/apps/docs/public/docs/v1.2.0/guides.json +0 -1212
- package/core/apps/docs/public/docs/v1.2.0/main.json +0 -14663
- package/core/apps/docs/public/docs/v1.2.1/guides.json +0 -1293
- package/core/apps/docs/public/docs/v1.2.1/main.json +0 -14828
- package/core/apps/docs/public/docs/v1.2.2/guides.json +0 -1293
- package/core/apps/docs/public/docs/v1.2.2/main.json +0 -15025
- package/core/apps/docs/public/docs/v1.2.3/guides.json +0 -1420
- package/core/apps/docs/public/docs/v1.2.3/main.json +0 -14954
- package/core/apps/docs/public/docs/v1.2.4/guides.json +0 -1420
- package/core/apps/docs/public/docs/v1.2.4/main.json +0 -14981
- package/core/apps/docs/public/docs/versions.json +0 -24
- package/core/apps/docs/public/flux.png +0 -0
- package/core/apps/docs/public/locales/en.json +0 -50
- package/core/apps/docs/public/locales/guides-en.json +0 -512
- package/core/apps/docs/public/robots.txt +0 -4
- package/core/apps/docs/public/sitemap.xml +0 -33
- package/core/apps/docs/src/App.vue +0 -538
- package/core/apps/docs/src/components/ApiCategorySection.vue +0 -42
- package/core/apps/docs/src/components/ApiDiscordCompat.vue +0 -65
- package/core/apps/docs/src/components/ApiEndpointCard.vue +0 -313
- package/core/apps/docs/src/components/ApiSchemaBlock.vue +0 -131
- package/core/apps/docs/src/components/CodeBlock.vue +0 -177
- package/core/apps/docs/src/components/CommunityCallout.vue +0 -90
- package/core/apps/docs/src/components/ConstructorSection.vue +0 -82
- package/core/apps/docs/src/components/DocDescription.vue +0 -40
- package/core/apps/docs/src/components/FluxerLogo.vue +0 -3
- package/core/apps/docs/src/components/Footer.vue +0 -106
- package/core/apps/docs/src/components/GuideCodeBlock.vue +0 -102
- package/core/apps/docs/src/components/GuideDiscordCompat.vue +0 -77
- package/core/apps/docs/src/components/GuideDiscordCompatCallout.vue +0 -83
- package/core/apps/docs/src/components/GuideTable.vue +0 -77
- package/core/apps/docs/src/components/GuideTip.vue +0 -38
- package/core/apps/docs/src/components/MethodsSection.vue +0 -195
- package/core/apps/docs/src/components/ParamsTable.vue +0 -70
- package/core/apps/docs/src/components/PropertiesSection.vue +0 -143
- package/core/apps/docs/src/components/SearchBar.vue +0 -76
- package/core/apps/docs/src/components/SearchModal.vue +0 -361
- package/core/apps/docs/src/components/SidebarNav.vue +0 -225
- package/core/apps/docs/src/components/SponsorBanner.vue +0 -153
- package/core/apps/docs/src/components/TypeSignature.vue +0 -187
- package/core/apps/docs/src/components/VersionPicker.vue +0 -191
- package/core/apps/docs/src/composables/useSearchIndex.ts +0 -144
- package/core/apps/docs/src/composables/useVersionedPath.ts +0 -20
- package/core/apps/docs/src/data/apiEndpoints.ts +0 -1073
- package/core/apps/docs/src/data/changelog.ts +0 -717
- package/core/apps/docs/src/data/guides.ts +0 -2362
- package/core/apps/docs/src/env.d.ts +0 -7
- package/core/apps/docs/src/locales/guides-en.json +0 -512
- package/core/apps/docs/src/main.ts +0 -27
- package/core/apps/docs/src/pages/ApiReferenceLayout.vue +0 -175
- package/core/apps/docs/src/pages/ApiReferencePage.vue +0 -128
- package/core/apps/docs/src/pages/Changelog.vue +0 -288
- package/core/apps/docs/src/pages/ClassPage.vue +0 -319
- package/core/apps/docs/src/pages/ClassesList.vue +0 -100
- package/core/apps/docs/src/pages/DocsLayout.vue +0 -127
- package/core/apps/docs/src/pages/GuidePage.vue +0 -279
- package/core/apps/docs/src/pages/GuidesIndex.vue +0 -166
- package/core/apps/docs/src/pages/GuidesLayout.vue +0 -245
- package/core/apps/docs/src/pages/Home.vue +0 -125
- package/core/apps/docs/src/pages/NotFound.vue +0 -57
- package/core/apps/docs/src/pages/TypedefPage.vue +0 -230
- package/core/apps/docs/src/pages/TypedefsList.vue +0 -168
- package/core/apps/docs/src/pages/VersionLayout.vue +0 -15
- package/core/apps/docs/src/router.ts +0 -73
- package/core/apps/docs/src/stores/docs.ts +0 -54
- package/core/apps/docs/src/stores/guides.ts +0 -53
- package/core/apps/docs/src/stores/version.ts +0 -67
- package/core/apps/docs/src/styles/main.css +0 -278
- package/core/apps/docs/src/styles/prism.css +0 -95
- package/core/apps/docs/src/types/doc-schema.ts +0 -112
- package/core/apps/docs/tsconfig.json +0 -17
- package/core/apps/docs/tsconfig.node.json +0 -10
- package/core/apps/docs/vite.config.d.ts +0 -2
- package/core/apps/docs/vite.config.js +0 -26
- package/core/apps/docs/vite.config.ts +0 -28
- package/core/apps/docs-vitepress/.vitepress/config.ts +0 -141
- package/core/apps/docs-vitepress/api-data/latest/main.json +0 -15035
- package/core/apps/docs-vitepress/api-data/v1.2.4/main.json +0 -15035
- package/core/apps/docs-vitepress/api-data/versions.json +0 -6
- package/core/apps/docs-vitepress/index.md +0 -15
- package/core/apps/docs-vitepress/package-lock.json +0 -2924
- package/core/apps/docs-vitepress/package.json +0 -20
- package/core/apps/docs-vitepress/public/CNAME +0 -1
- package/core/apps/docs-vitepress/scripts/generate-api.ts +0 -243
- package/core/apps/docs-vitepress/scripts/migrate-guides.ts +0 -129
- package/core/apps/docs-vitepress/tsconfig.json +0 -11
- package/core/apps/docs-vitepress/v/latest/guides/attachments-by-url.md +0 -57
- package/core/apps/docs-vitepress/v/latest/guides/attachments.md +0 -62
- package/core/apps/docs-vitepress/v/latest/guides/basic-bot.md +0 -49
- package/core/apps/docs-vitepress/v/latest/guides/channels.md +0 -180
- package/core/apps/docs-vitepress/v/latest/guides/deprecated-apis.md +0 -58
- package/core/apps/docs-vitepress/v/latest/guides/discord-js-compatibility.md +0 -42
- package/core/apps/docs-vitepress/v/latest/guides/editing-embeds.md +0 -65
- package/core/apps/docs-vitepress/v/latest/guides/embed-media.md +0 -87
- package/core/apps/docs-vitepress/v/latest/guides/embeds.md +0 -166
- package/core/apps/docs-vitepress/v/latest/guides/emojis.md +0 -77
- package/core/apps/docs-vitepress/v/latest/guides/events.md +0 -202
- package/core/apps/docs-vitepress/v/latest/guides/gifs.md +0 -47
- package/core/apps/docs-vitepress/v/latest/guides/installation.md +0 -10
- package/core/apps/docs-vitepress/v/latest/guides/moderation.md +0 -89
- package/core/apps/docs-vitepress/v/latest/guides/permissions.md +0 -130
- package/core/apps/docs-vitepress/v/latest/guides/prefix-commands.md +0 -41
- package/core/apps/docs-vitepress/v/latest/guides/profile-urls.md +0 -58
- package/core/apps/docs-vitepress/v/latest/guides/reactions.md +0 -69
- package/core/apps/docs-vitepress/v/latest/guides/roles.md +0 -130
- package/core/apps/docs-vitepress/v/latest/guides/sending-without-reply.md +0 -172
- package/core/apps/docs-vitepress/v/latest/guides/voice.md +0 -109
- package/core/apps/docs-vitepress/v/latest/guides/wait-for-guilds.md +0 -37
- package/core/apps/docs-vitepress/v/latest/guides/webhook-attachments-embeds.md +0 -73
- package/core/apps/docs-vitepress/v/latest/guides/webhooks.md +0 -131
- package/core/eslint.config.js +0 -80
- package/core/examples/.env.example +0 -22
- package/core/examples/README.md +0 -68
- package/core/examples/first-steps-bot.js +0 -118
- package/core/examples/minimal-bot.js +0 -17
- package/core/examples/moderation-bot.js +0 -209
- package/core/examples/package.json +0 -14
- package/core/examples/ping-bot.js +0 -1146
- package/core/examples/reaction-bot.js +0 -70
- package/core/examples/reaction-roles-bot.js +0 -140
- package/core/examples/webhook-bot.js +0 -239
- package/core/flux.png +0 -0
- package/core/package.json +0 -78
- package/core/packages/builders/package.json +0 -51
- package/core/packages/builders/src/index.ts +0 -13
- package/core/packages/builders/src/messages/AttachmentBuilder.test.ts +0 -79
- package/core/packages/builders/src/messages/AttachmentBuilder.ts +0 -69
- package/core/packages/builders/src/messages/EmbedBuilder.test.ts +0 -266
- package/core/packages/builders/src/messages/EmbedBuilder.ts +0 -239
- package/core/packages/builders/src/messages/MessagePayload.test.ts +0 -118
- package/core/packages/builders/src/messages/MessagePayload.ts +0 -122
- package/core/packages/builders/tsconfig.json +0 -9
- package/core/packages/builders/tsup.config.ts +0 -9
- package/core/packages/builders/vitest.config.ts +0 -9
- package/core/packages/collection/package.json +0 -47
- package/core/packages/collection/src/Collection.test.ts +0 -232
- package/core/packages/collection/src/Collection.ts +0 -196
- package/core/packages/collection/src/index.ts +0 -1
- package/core/packages/collection/tsconfig.json +0 -9
- package/core/packages/collection/tsup.config.ts +0 -9
- package/core/packages/collection/vitest.config.ts +0 -9
- package/core/packages/docgen/package.json +0 -26
- package/core/packages/docgen/src/extract.ts +0 -262
- package/core/packages/docgen/src/formatType.ts +0 -24
- package/core/packages/docgen/src/index.ts +0 -103
- package/core/packages/docgen/src/schema.ts +0 -100
- package/core/packages/docgen/src/visitor.ts +0 -147
- package/core/packages/docgen/tsconfig.json +0 -9
- package/core/packages/docgen/tsup.config.ts +0 -9
- package/core/packages/fluxer-core/README.md +0 -26
- package/core/packages/fluxer-core/package.json +0 -60
- package/core/packages/fluxer-core/src/client/ChannelManager.ts +0 -143
- package/core/packages/fluxer-core/src/client/Client.gateway.test.ts +0 -84
- package/core/packages/fluxer-core/src/client/Client.resolveEmoji.test.ts +0 -45
- package/core/packages/fluxer-core/src/client/Client.ts +0 -558
- package/core/packages/fluxer-core/src/client/ClientUser.ts +0 -40
- package/core/packages/fluxer-core/src/client/EventHandlerRegistry.ts +0 -469
- package/core/packages/fluxer-core/src/client/GuildManager.ts +0 -79
- package/core/packages/fluxer-core/src/client/GuildMemberManager.ts +0 -91
- package/core/packages/fluxer-core/src/client/MessageManager.ts +0 -58
- package/core/packages/fluxer-core/src/client/UsersManager.ts +0 -122
- package/core/packages/fluxer-core/src/errors/ErrorCodes.test.ts +0 -19
- package/core/packages/fluxer-core/src/errors/ErrorCodes.ts +0 -12
- package/core/packages/fluxer-core/src/errors/FluxerError.test.ts +0 -32
- package/core/packages/fluxer-core/src/errors/FluxerError.ts +0 -15
- package/core/packages/fluxer-core/src/index.ts +0 -85
- package/core/packages/fluxer-core/src/structures/Base.ts +0 -7
- package/core/packages/fluxer-core/src/structures/Channel.ts +0 -508
- package/core/packages/fluxer-core/src/structures/Guild.test.ts +0 -189
- package/core/packages/fluxer-core/src/structures/Guild.ts +0 -734
- package/core/packages/fluxer-core/src/structures/GuildBan.ts +0 -35
- package/core/packages/fluxer-core/src/structures/GuildEmoji.ts +0 -57
- package/core/packages/fluxer-core/src/structures/GuildMember.test.ts +0 -203
- package/core/packages/fluxer-core/src/structures/GuildMember.ts +0 -213
- package/core/packages/fluxer-core/src/structures/GuildMemberRoleManager.ts +0 -121
- package/core/packages/fluxer-core/src/structures/GuildSticker.ts +0 -56
- package/core/packages/fluxer-core/src/structures/Invite.test.ts +0 -103
- package/core/packages/fluxer-core/src/structures/Invite.ts +0 -121
- package/core/packages/fluxer-core/src/structures/Message.test.ts +0 -109
- package/core/packages/fluxer-core/src/structures/Message.ts +0 -397
- package/core/packages/fluxer-core/src/structures/MessageReaction.ts +0 -72
- package/core/packages/fluxer-core/src/structures/PartialMessage.ts +0 -12
- package/core/packages/fluxer-core/src/structures/Role.test.ts +0 -77
- package/core/packages/fluxer-core/src/structures/Role.ts +0 -112
- package/core/packages/fluxer-core/src/structures/User.test.ts +0 -110
- package/core/packages/fluxer-core/src/structures/User.ts +0 -109
- package/core/packages/fluxer-core/src/structures/Webhook.test.ts +0 -109
- package/core/packages/fluxer-core/src/structures/Webhook.ts +0 -258
- package/core/packages/fluxer-core/src/util/Constants.test.ts +0 -16
- package/core/packages/fluxer-core/src/util/Constants.ts +0 -7
- package/core/packages/fluxer-core/src/util/Events.ts +0 -46
- package/core/packages/fluxer-core/src/util/MessageCollector.ts +0 -87
- package/core/packages/fluxer-core/src/util/Options.ts +0 -33
- package/core/packages/fluxer-core/src/util/ReactionCollector.ts +0 -116
- package/core/packages/fluxer-core/src/util/cdn.test.ts +0 -108
- package/core/packages/fluxer-core/src/util/cdn.ts +0 -130
- package/core/packages/fluxer-core/src/util/guildUtils.ts +0 -33
- package/core/packages/fluxer-core/src/util/messageUtils.test.ts +0 -74
- package/core/packages/fluxer-core/src/util/messageUtils.ts +0 -119
- package/core/packages/fluxer-core/src/util/permissions.test.ts +0 -95
- package/core/packages/fluxer-core/src/util/permissions.ts +0 -43
- package/core/packages/fluxer-core/tsconfig.json +0 -9
- package/core/packages/fluxer-core/tsup.config.ts +0 -9
- package/core/packages/fluxer-core/vitest.config.ts +0 -9
- package/core/packages/rest/package.json +0 -52
- package/core/packages/rest/src/REST.test.ts +0 -64
- package/core/packages/rest/src/REST.ts +0 -90
- package/core/packages/rest/src/RateLimitManager.test.ts +0 -71
- package/core/packages/rest/src/RateLimitManager.ts +0 -60
- package/core/packages/rest/src/RequestManager.test.ts +0 -87
- package/core/packages/rest/src/RequestManager.ts +0 -172
- package/core/packages/rest/src/errors/FluxerAPIError.test.ts +0 -57
- package/core/packages/rest/src/errors/FluxerAPIError.ts +0 -21
- package/core/packages/rest/src/errors/HTTPError.test.ts +0 -55
- package/core/packages/rest/src/errors/HTTPError.ts +0 -25
- package/core/packages/rest/src/errors/RateLimitError.test.ts +0 -41
- package/core/packages/rest/src/errors/RateLimitError.ts +0 -15
- package/core/packages/rest/src/errors/index.ts +0 -3
- package/core/packages/rest/src/index.ts +0 -6
- package/core/packages/rest/src/utils/constants.test.ts +0 -31
- package/core/packages/rest/src/utils/constants.ts +0 -5
- package/core/packages/rest/src/utils/files.test.ts +0 -37
- package/core/packages/rest/src/utils/files.ts +0 -75
- package/core/packages/rest/tsconfig.json +0 -9
- package/core/packages/rest/tsup.config.ts +0 -9
- package/core/packages/rest/vitest.config.ts +0 -9
- package/core/packages/types/package.json +0 -46
- package/core/packages/types/src/api/ban.ts +0 -8
- package/core/packages/types/src/api/channel.ts +0 -65
- package/core/packages/types/src/api/embed.ts +0 -82
- package/core/packages/types/src/api/emoji.ts +0 -12
- package/core/packages/types/src/api/errors.ts +0 -68
- package/core/packages/types/src/api/gateway.ts +0 -14
- package/core/packages/types/src/api/guild.ts +0 -123
- package/core/packages/types/src/api/index.ts +0 -15
- package/core/packages/types/src/api/instance.ts +0 -32
- package/core/packages/types/src/api/interaction.ts +0 -26
- package/core/packages/types/src/api/invite.ts +0 -28
- package/core/packages/types/src/api/message.ts +0 -140
- package/core/packages/types/src/api/role.ts +0 -41
- package/core/packages/types/src/api/sticker.ts +0 -14
- package/core/packages/types/src/api/user.ts +0 -79
- package/core/packages/types/src/api/webhook.ts +0 -41
- package/core/packages/types/src/common/index.ts +0 -1
- package/core/packages/types/src/common/snowflake.test.ts +0 -9
- package/core/packages/types/src/common/snowflake.ts +0 -8
- package/core/packages/types/src/gateway/events.ts +0 -189
- package/core/packages/types/src/gateway/index.ts +0 -3
- package/core/packages/types/src/gateway/opcodes.ts +0 -17
- package/core/packages/types/src/gateway/payloads.ts +0 -481
- package/core/packages/types/src/index.ts +0 -4
- package/core/packages/types/src/rest/index.ts +0 -1
- package/core/packages/types/src/rest/routes.test.ts +0 -169
- package/core/packages/types/src/rest/routes.ts +0 -109
- package/core/packages/types/tsconfig.json +0 -9
- package/core/packages/types/tsup.config.ts +0 -9
- package/core/packages/types/vitest.config.ts +0 -9
- package/core/packages/util/package.json +0 -51
- package/core/packages/util/src/BitField.test.ts +0 -96
- package/core/packages/util/src/BitField.ts +0 -105
- package/core/packages/util/src/MessageFlagsBitField.test.ts +0 -42
- package/core/packages/util/src/MessageFlagsBitField.ts +0 -20
- package/core/packages/util/src/PermissionsBitField.test.ts +0 -79
- package/core/packages/util/src/PermissionsBitField.ts +0 -97
- package/core/packages/util/src/SnowflakeUtil.test.ts +0 -69
- package/core/packages/util/src/SnowflakeUtil.ts +0 -65
- package/core/packages/util/src/UserFlagsBitField.test.ts +0 -39
- package/core/packages/util/src/UserFlagsBitField.ts +0 -48
- package/core/packages/util/src/deprecation.test.ts +0 -44
- package/core/packages/util/src/deprecation.ts +0 -28
- package/core/packages/util/src/emojiShortcodes.generated.ts +0 -5
- package/core/packages/util/src/emojiShortcodes.test.ts +0 -41
- package/core/packages/util/src/emojiShortcodes.ts +0 -22
- package/core/packages/util/src/formatters.test.ts +0 -65
- package/core/packages/util/src/formatters.ts +0 -35
- package/core/packages/util/src/index.ts +0 -34
- package/core/packages/util/src/resolvers.test.ts +0 -198
- package/core/packages/util/src/resolvers.ts +0 -127
- package/core/packages/util/src/tenorUtils.test.ts +0 -75
- package/core/packages/util/src/tenorUtils.ts +0 -86
- package/core/packages/util/tsconfig.json +0 -9
- package/core/packages/util/tsup.config.ts +0 -9
- package/core/packages/util/vitest.config.ts +0 -9
- package/core/packages/voice/README.md +0 -42
- package/core/packages/voice/package.json +0 -67
- package/core/packages/voice/src/LiveKitRtcConnection.receive.test.ts +0 -24
- package/core/packages/voice/src/LiveKitRtcConnection.ts +0 -1767
- package/core/packages/voice/src/VoiceConnection.ts +0 -413
- package/core/packages/voice/src/VoiceManager.receive.test.ts +0 -61
- package/core/packages/voice/src/VoiceManager.test.ts +0 -44
- package/core/packages/voice/src/VoiceManager.ts +0 -503
- package/core/packages/voice/src/exports.test.ts +0 -38
- package/core/packages/voice/src/index.ts +0 -51
- package/core/packages/voice/src/livekit.test.ts +0 -48
- package/core/packages/voice/src/livekit.ts +0 -33
- package/core/packages/voice/src/mp4box.d.ts +0 -32
- package/core/packages/voice/src/opusUtils.test.ts +0 -29
- package/core/packages/voice/src/opusUtils.ts +0 -86
- package/core/packages/voice/src/streamPreviewPlaceholder.test.ts +0 -16
- package/core/packages/voice/src/streamPreviewPlaceholder.ts +0 -8
- package/core/packages/voice/src/ws.d.ts +0 -1
- package/core/packages/voice/tsconfig.json +0 -5
- package/core/packages/voice/tsup.config.ts +0 -10
- package/core/packages/voice/vitest.config.ts +0 -9
- package/core/packages/ws/package.json +0 -52
- package/core/packages/ws/src/WebSocketManager.ts +0 -130
- package/core/packages/ws/src/WebSocketShard.ts +0 -296
- package/core/packages/ws/src/index.ts +0 -12
- package/core/packages/ws/src/utils/constants.test.ts +0 -46
- package/core/packages/ws/src/utils/constants.ts +0 -22
- package/core/packages/ws/src/utils/getWebSocket.ts +0 -55
- package/core/packages/ws/src/ws.d.ts +0 -10
- package/core/packages/ws/tsconfig.json +0 -9
- package/core/packages/ws/tsup.config.ts +0 -9
- package/core/pnpm-lock.yaml +0 -7033
- package/core/pnpm-workspace.yaml +0 -4
- package/core/scripts/generate-ai-rag.ts +0 -240
- package/core/scripts/generate-docs.ts +0 -143
- package/core/scripts/generate-emoji-shortcodes.ts +0 -58
- package/core/scripts/generate-types.ts +0 -6
- package/core/scripts/publish-ordered.js +0 -63
- package/core/scripts/test-cjs-require.mjs +0 -43
- package/core/scripts/test-esm-imports.mjs +0 -42
- package/core/scripts/test-package-exports.mjs +0 -98
- package/core/scripts/test-smoke.mjs +0 -103
- package/core/tsconfig.json +0 -18
- package/core/turbo.json +0 -30
- package/core/vitest.config.ts +0 -17
- package/core/wrangler.jsonc +0 -9
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@erinjs/types",
|
|
3
|
-
"publishConfig": {
|
|
4
|
-
"access": "public"
|
|
5
|
-
},
|
|
6
|
-
"version": "1.2.4",
|
|
7
|
-
"description": "TypeScript types for the Fluxer API",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "https://github.com/blstmo-abandoned-us-for-the-milk/core.git",
|
|
11
|
-
"directory": "packages/types"
|
|
12
|
-
},
|
|
13
|
-
"bugs": "https://github.com/blstmo-abandoned-us-for-the-milk/core/issues",
|
|
14
|
-
"homepage": "https://github.com/blstmo-abandoned-us-for-the-milk/core#readme",
|
|
15
|
-
"keywords": [
|
|
16
|
-
"fluxer",
|
|
17
|
-
"types",
|
|
18
|
-
"api"
|
|
19
|
-
],
|
|
20
|
-
"license": "Apache-2.0",
|
|
21
|
-
"main": "./dist/index.js",
|
|
22
|
-
"module": "./dist/index.mjs",
|
|
23
|
-
"types": "./dist/index.d.ts",
|
|
24
|
-
"exports": {
|
|
25
|
-
".": {
|
|
26
|
-
"types": "./dist/index.d.ts",
|
|
27
|
-
"import": "./dist/index.mjs",
|
|
28
|
-
"require": "./dist/index.js"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"files": [
|
|
32
|
-
"dist"
|
|
33
|
-
],
|
|
34
|
-
"scripts": {
|
|
35
|
-
"build": "tsup",
|
|
36
|
-
"clean": "rm -rf dist",
|
|
37
|
-
"lint": "eslint src --max-warnings 0 --config ../../eslint.config.js",
|
|
38
|
-
"lint:fix": "eslint src --fix --config ../../eslint.config.js",
|
|
39
|
-
"test": "vitest run --passWithNoTests",
|
|
40
|
-
"test:coverage": "vitest run --coverage --passWithNoTests"
|
|
41
|
-
},
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"tsup": "^8.3.0",
|
|
44
|
-
"typescript": "^5.6.0"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { Snowflake } from '../common/snowflake.js';
|
|
2
|
-
import { APIUser } from './user.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Channel type enum (Fluxer/Discord compatible).
|
|
6
|
-
* API may return additional types (e.g. 998 for link channels with url).
|
|
7
|
-
*/
|
|
8
|
-
export enum ChannelType {
|
|
9
|
-
GuildText = 0,
|
|
10
|
-
DM = 1,
|
|
11
|
-
GuildVoice = 2,
|
|
12
|
-
GroupDM = 3,
|
|
13
|
-
GuildCategory = 4,
|
|
14
|
-
GuildLink = 5,
|
|
15
|
-
/** Fluxer link channel (GET /guilds/{id}/channels returns type 998 for url channels) */
|
|
16
|
-
GuildLinkExtended = 998,
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/** Permission overwrite type */
|
|
20
|
-
export enum OverwriteType {
|
|
21
|
-
Role = 0,
|
|
22
|
-
Member = 1,
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/** Permission overwrite from GET /channels/{id} or GET /guilds/{id}/channels */
|
|
26
|
-
export interface APIChannelOverwrite {
|
|
27
|
-
id: Snowflake;
|
|
28
|
-
type: OverwriteType;
|
|
29
|
-
allow: string;
|
|
30
|
-
deny: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/** Minimal channel (id, type required) */
|
|
34
|
-
export interface APIChannelPartial {
|
|
35
|
-
id: Snowflake;
|
|
36
|
-
name?: string | null;
|
|
37
|
-
type: ChannelType | number;
|
|
38
|
-
icon?: string | null;
|
|
39
|
-
parent_id?: Snowflake | null;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Channel from GET /channels/{id} or GET /guilds/{id}/channels
|
|
44
|
-
*/
|
|
45
|
-
export interface APIChannel extends APIChannelPartial {
|
|
46
|
-
guild_id?: Snowflake | null;
|
|
47
|
-
name: string | null;
|
|
48
|
-
topic?: string | null;
|
|
49
|
-
/** External URL (link channels, type 998) */
|
|
50
|
-
url?: string | null;
|
|
51
|
-
icon?: string | null;
|
|
52
|
-
owner_id?: Snowflake | null;
|
|
53
|
-
position?: number;
|
|
54
|
-
parent_id: Snowflake | null;
|
|
55
|
-
bitrate?: number | null;
|
|
56
|
-
user_limit?: number | null;
|
|
57
|
-
rtc_region?: string | null;
|
|
58
|
-
last_message_id?: Snowflake | null;
|
|
59
|
-
last_pin_timestamp?: string | null;
|
|
60
|
-
permission_overwrites?: APIChannelOverwrite[];
|
|
61
|
-
recipients?: APIUser[];
|
|
62
|
-
nsfw?: boolean;
|
|
63
|
-
rate_limit_per_user?: number;
|
|
64
|
-
nicks?: Record<string, string>;
|
|
65
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
export interface APIEmbedAuthor {
|
|
2
|
-
name?: string;
|
|
3
|
-
url?: string;
|
|
4
|
-
icon_url?: string;
|
|
5
|
-
proxy_icon_url?: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface APIEmbedFooter {
|
|
9
|
-
text: string;
|
|
10
|
-
icon_url?: string;
|
|
11
|
-
proxy_icon_url?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/** Bitwise flags for embed media. */
|
|
15
|
-
export const EmbedMediaFlags = {
|
|
16
|
-
/** Embed media contains explicit content */
|
|
17
|
-
CONTAINS_EXPLICIT_MEDIA: 16,
|
|
18
|
-
/** Embed media is animated */
|
|
19
|
-
IS_ANIMATED: 32,
|
|
20
|
-
} as const;
|
|
21
|
-
|
|
22
|
-
export interface APIEmbedMedia {
|
|
23
|
-
url: string;
|
|
24
|
-
proxy_url?: string | null;
|
|
25
|
-
content_type?: string | null;
|
|
26
|
-
content_hash?: string | null;
|
|
27
|
-
width?: number | null;
|
|
28
|
-
height?: number | null;
|
|
29
|
-
description?: string | null;
|
|
30
|
-
/** Base64 placeholder for lazy loading */
|
|
31
|
-
placeholder?: string | null;
|
|
32
|
-
duration?: number | null;
|
|
33
|
-
/** EmbedMediaFlags bitfield (e.g. EmbedMediaFlags.CONTAINS_EXPLICIT_MEDIA) */
|
|
34
|
-
flags?: number | null;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface APIEmbedField {
|
|
38
|
-
name: string;
|
|
39
|
-
value: string;
|
|
40
|
-
inline?: boolean;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export type EmbedType = 'rich' | 'image' | 'video' | 'gifv' | 'article' | 'link';
|
|
44
|
-
|
|
45
|
-
/** Nested embed from unfurlers (subset of APIEmbed) */
|
|
46
|
-
export interface APIEmbedChild {
|
|
47
|
-
type?: EmbedType;
|
|
48
|
-
url?: string | null;
|
|
49
|
-
title?: string | null;
|
|
50
|
-
color?: number | null;
|
|
51
|
-
timestamp?: string | null;
|
|
52
|
-
description?: string | null;
|
|
53
|
-
author?: APIEmbedAuthor | null;
|
|
54
|
-
image?: APIEmbedMedia | null;
|
|
55
|
-
thumbnail?: APIEmbedMedia | null;
|
|
56
|
-
footer?: APIEmbedFooter | null;
|
|
57
|
-
fields?: APIEmbedField[] | null;
|
|
58
|
-
provider?: APIEmbedAuthor | null;
|
|
59
|
-
video?: APIEmbedMedia | null;
|
|
60
|
-
audio?: APIEmbedMedia | null;
|
|
61
|
-
nsfw?: boolean | null;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface APIEmbed {
|
|
65
|
-
type?: EmbedType;
|
|
66
|
-
url?: string | null;
|
|
67
|
-
title?: string | null;
|
|
68
|
-
color?: number | null;
|
|
69
|
-
timestamp?: string | null;
|
|
70
|
-
description?: string | null;
|
|
71
|
-
author?: APIEmbedAuthor | null;
|
|
72
|
-
image?: APIEmbedMedia | null;
|
|
73
|
-
thumbnail?: APIEmbedMedia | null;
|
|
74
|
-
footer?: APIEmbedFooter | null;
|
|
75
|
-
fields?: APIEmbedField[] | null;
|
|
76
|
-
provider?: APIEmbedAuthor | null;
|
|
77
|
-
video?: APIEmbedMedia | null;
|
|
78
|
-
audio?: APIEmbedMedia | null;
|
|
79
|
-
nsfw?: boolean | null;
|
|
80
|
-
/** Nested embeds from unfurlers */
|
|
81
|
-
children?: APIEmbedChild[] | null;
|
|
82
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Snowflake } from '../common/snowflake.js';
|
|
2
|
-
import { APIUser } from './user.js';
|
|
3
|
-
|
|
4
|
-
export interface APIEmoji {
|
|
5
|
-
id: Snowflake;
|
|
6
|
-
name: string;
|
|
7
|
-
animated: boolean;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface APIEmojiWithUser extends APIEmoji {
|
|
11
|
-
user?: APIUser;
|
|
12
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* API error codes returned by the Fluxer API.
|
|
3
|
-
* Subset of commonly used codes for bot development.
|
|
4
|
-
*/
|
|
5
|
-
export enum APIErrorCode {
|
|
6
|
-
// Auth
|
|
7
|
-
Unauthorized = 'UNAUTHORIZED',
|
|
8
|
-
Forbidden = 'FORBIDDEN',
|
|
9
|
-
MissingAuthorization = 'MISSING_AUTHORIZATION',
|
|
10
|
-
InvalidAuthToken = 'INVALID_AUTH_TOKEN',
|
|
11
|
-
InvalidToken = 'INVALID_TOKEN',
|
|
12
|
-
TwoFactorRequired = 'TWO_FACTOR_REQUIRED',
|
|
13
|
-
SudoModeRequired = 'SUDO_MODE_REQUIRED',
|
|
14
|
-
|
|
15
|
-
// Not found
|
|
16
|
-
NotFound = 'NOT_FOUND',
|
|
17
|
-
UnknownUser = 'UNKNOWN_USER',
|
|
18
|
-
UnknownGuild = 'UNKNOWN_GUILD',
|
|
19
|
-
UnknownChannel = 'UNKNOWN_CHANNEL',
|
|
20
|
-
UnknownMessage = 'UNKNOWN_MESSAGE',
|
|
21
|
-
UnknownRole = 'UNKNOWN_ROLE',
|
|
22
|
-
UnknownEmoji = 'UNKNOWN_EMOJI',
|
|
23
|
-
UnknownSticker = 'UNKNOWN_STICKER',
|
|
24
|
-
UnknownWebhook = 'UNKNOWN_WEBHOOK',
|
|
25
|
-
UnknownInvite = 'UNKNOWN_INVITE',
|
|
26
|
-
|
|
27
|
-
// Validation
|
|
28
|
-
BadRequest = 'BAD_REQUEST',
|
|
29
|
-
ValidationError = 'VALIDATION_ERROR',
|
|
30
|
-
InvalidRequest = 'INVALID_REQUEST',
|
|
31
|
-
InvalidFormBody = 'INVALID_FORM_BODY',
|
|
32
|
-
|
|
33
|
-
// Rate limit
|
|
34
|
-
RateLimited = 'RATE_LIMITED',
|
|
35
|
-
SlowmodeRateLimited = 'SLOWMODE_RATE_LIMITED',
|
|
36
|
-
|
|
37
|
-
// Server
|
|
38
|
-
InternalServerError = 'INTERNAL_SERVER_ERROR',
|
|
39
|
-
BadGateway = 'BAD_GATEWAY',
|
|
40
|
-
GatewayTimeout = 'GATEWAY_TIMEOUT',
|
|
41
|
-
ServiceUnavailable = 'SERVICE_UNAVAILABLE',
|
|
42
|
-
|
|
43
|
-
// Bot-specific
|
|
44
|
-
BotsCannotSendFriendRequests = 'BOTS_CANNOT_SEND_FRIEND_REQUESTS',
|
|
45
|
-
BotAlreadyInGuild = 'BOT_ALREADY_IN_GUILD',
|
|
46
|
-
BotApplicationNotFound = 'BOT_APPLICATION_NOT_FOUND',
|
|
47
|
-
BotIsPrivate = 'BOT_IS_PRIVATE',
|
|
48
|
-
NotABotApplication = 'NOT_A_BOT_APPLICATION',
|
|
49
|
-
|
|
50
|
-
// Content
|
|
51
|
-
CannotSendEmptyMessage = 'CANNOT_SEND_EMPTY_MESSAGE',
|
|
52
|
-
FileSizeTooLarge = 'FILE_SIZE_TOO_LARGE',
|
|
53
|
-
MaxEmojis = 'MAX_EMOJIS',
|
|
54
|
-
MaxStickers = 'MAX_STICKERS',
|
|
55
|
-
MaxWebhooks = 'MAX_WEBHOOKS',
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export interface APIErrorBody {
|
|
59
|
-
code: APIErrorCode | string;
|
|
60
|
-
message: string;
|
|
61
|
-
errors?: Array<{ path: string; message: string; code?: string }>;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface RateLimitErrorBody extends APIErrorBody {
|
|
65
|
-
code: 'RATE_LIMITED';
|
|
66
|
-
retry_after: number;
|
|
67
|
-
global?: boolean;
|
|
68
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Response from GET /gateway/bot
|
|
3
|
-
* url: WebSocket URL, session_start_limit: rate limit info in ms
|
|
4
|
-
*/
|
|
5
|
-
export interface APIGatewayBotResponse {
|
|
6
|
-
url: string;
|
|
7
|
-
shards: number;
|
|
8
|
-
session_start_limit: {
|
|
9
|
-
total: number;
|
|
10
|
-
remaining: number;
|
|
11
|
-
reset_after: number;
|
|
12
|
-
max_concurrency: number;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { Snowflake } from '../common/snowflake.js';
|
|
2
|
-
|
|
3
|
-
export enum GuildVerificationLevel {
|
|
4
|
-
None = 0,
|
|
5
|
-
Low = 1,
|
|
6
|
-
Medium = 2,
|
|
7
|
-
High = 3,
|
|
8
|
-
VeryHigh = 4,
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export enum GuildMFALevel {
|
|
12
|
-
None = 0,
|
|
13
|
-
Elevated = 1,
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export enum GuildExplicitContentFilter {
|
|
17
|
-
Disabled = 0,
|
|
18
|
-
MembersWithoutRoles = 1,
|
|
19
|
-
AllMembers = 2,
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export enum DefaultMessageNotifications {
|
|
23
|
-
AllMessages = 0,
|
|
24
|
-
OnlyMentions = 1,
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type GuildFeature =
|
|
28
|
-
| 'ANIMATED_ICON'
|
|
29
|
-
| 'ANIMATED_BANNER'
|
|
30
|
-
| 'BANNER'
|
|
31
|
-
| 'DETACHED_BANNER'
|
|
32
|
-
| 'INVITE_SPLASH'
|
|
33
|
-
| 'INVITES_DISABLED'
|
|
34
|
-
| 'TEXT_CHANNEL_FLEXIBLE_NAMES'
|
|
35
|
-
| 'MORE_EMOJI'
|
|
36
|
-
| 'MORE_STICKERS'
|
|
37
|
-
| 'UNLIMITED_EMOJI'
|
|
38
|
-
| 'UNLIMITED_STICKERS'
|
|
39
|
-
| 'EXPRESSION_PURGE_ALLOWED'
|
|
40
|
-
| 'VANITY_URL'
|
|
41
|
-
| 'VERIFIED'
|
|
42
|
-
| 'VIP_VOICE'
|
|
43
|
-
| 'UNAVAILABLE_FOR_EVERYONE'
|
|
44
|
-
| 'UNAVAILABLE_FOR_EVERYONE_BUT_STAFF'
|
|
45
|
-
| 'VISIONARY'
|
|
46
|
-
| 'OPERATOR'
|
|
47
|
-
| 'LARGE_GUILD_OVERRIDE'
|
|
48
|
-
| 'VERY_LARGE_GUILD'
|
|
49
|
-
| 'MT_MESSAGE_SCHEDULING'
|
|
50
|
-
| 'MT_EXPRESSION_PACKS';
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Guild from GET /guilds/{id} or gateway GUILD_CREATE
|
|
54
|
-
*/
|
|
55
|
-
export interface APIGuild {
|
|
56
|
-
id: Snowflake;
|
|
57
|
-
name: string;
|
|
58
|
-
icon: string | null;
|
|
59
|
-
banner: string | null;
|
|
60
|
-
banner_width?: number | null;
|
|
61
|
-
banner_height?: number | null;
|
|
62
|
-
splash?: string | null;
|
|
63
|
-
splash_width?: number | null;
|
|
64
|
-
splash_height?: number | null;
|
|
65
|
-
splash_card_alignment?: number;
|
|
66
|
-
embed_splash?: string | null;
|
|
67
|
-
embed_splash_width?: number | null;
|
|
68
|
-
embed_splash_height?: number | null;
|
|
69
|
-
vanity_url_code?: string | null;
|
|
70
|
-
owner_id: Snowflake;
|
|
71
|
-
system_channel_id?: Snowflake | null;
|
|
72
|
-
system_channel_flags?: number;
|
|
73
|
-
rules_channel_id?: Snowflake | null;
|
|
74
|
-
afk_channel_id?: Snowflake | null;
|
|
75
|
-
afk_timeout: number;
|
|
76
|
-
features: GuildFeature[];
|
|
77
|
-
verification_level: GuildVerificationLevel;
|
|
78
|
-
mfa_level: GuildMFALevel;
|
|
79
|
-
nsfw_level: number;
|
|
80
|
-
explicit_content_filter: GuildExplicitContentFilter;
|
|
81
|
-
default_message_notifications: DefaultMessageNotifications;
|
|
82
|
-
disabled_operations?: number;
|
|
83
|
-
message_history_cutoff?: string | null;
|
|
84
|
-
permissions?: string | null;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/** Audit log entry from GET /guilds/{id}/audit-logs */
|
|
88
|
-
export interface APIGuildAuditLogEntry {
|
|
89
|
-
id: string;
|
|
90
|
-
action_type: number;
|
|
91
|
-
user_id?: Snowflake | null;
|
|
92
|
-
target_id?: Snowflake | null;
|
|
93
|
-
reason?: string | null;
|
|
94
|
-
/** Changed fields. Value types vary by action_type (e.g. string for name, number for permissions). */
|
|
95
|
-
changes?: Array<{
|
|
96
|
-
key: string;
|
|
97
|
-
old_value?: string | number | boolean | null;
|
|
98
|
-
new_value?: string | number | boolean | null;
|
|
99
|
-
}>;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/** Response from GET /guilds/{id}/vanity-url */
|
|
103
|
-
export interface APIVanityURL {
|
|
104
|
-
code: string | null;
|
|
105
|
-
uses: number;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/** Request body for guild feature toggles (text-channel-flexible-names, etc.) */
|
|
109
|
-
export interface APIGuildFeatureToggle {
|
|
110
|
-
enabled: boolean;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/** Response from GET /guilds/{id}/audit-logs */
|
|
114
|
-
export interface APIGuildAuditLog {
|
|
115
|
-
audit_log_entries: APIGuildAuditLogEntry[];
|
|
116
|
-
users: Array<{
|
|
117
|
-
id: Snowflake;
|
|
118
|
-
username?: string;
|
|
119
|
-
discriminator?: string;
|
|
120
|
-
avatar?: string | null;
|
|
121
|
-
}>;
|
|
122
|
-
webhooks: Array<{ id: Snowflake; name?: string; avatar?: string | null }>;
|
|
123
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export * from './channel.js';
|
|
2
|
-
export * from './user.js';
|
|
3
|
-
export * from './guild.js';
|
|
4
|
-
export * from './embed.js';
|
|
5
|
-
export * from './message.js';
|
|
6
|
-
export * from './role.js';
|
|
7
|
-
export * from './emoji.js';
|
|
8
|
-
export * from './sticker.js';
|
|
9
|
-
export * from './webhook.js';
|
|
10
|
-
export * from './invite.js';
|
|
11
|
-
export * from './ban.js';
|
|
12
|
-
export * from './errors.js';
|
|
13
|
-
export * from './gateway.js';
|
|
14
|
-
export * from './instance.js';
|
|
15
|
-
export * from './interaction.js';
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Response from GET /instance (unauthenticated).
|
|
3
|
-
* Instance info and API/gateway endpoints.
|
|
4
|
-
*/
|
|
5
|
-
export interface APIInstance {
|
|
6
|
-
api_code_version: string | number;
|
|
7
|
-
endpoints: {
|
|
8
|
-
api: string;
|
|
9
|
-
gateway: string;
|
|
10
|
-
api_client?: string;
|
|
11
|
-
api_public?: string;
|
|
12
|
-
media?: string;
|
|
13
|
-
static_cdn?: string;
|
|
14
|
-
marketing?: string;
|
|
15
|
-
admin?: string;
|
|
16
|
-
invite?: string;
|
|
17
|
-
gift?: string;
|
|
18
|
-
webapp?: string;
|
|
19
|
-
[key: string]: unknown;
|
|
20
|
-
};
|
|
21
|
-
captcha?: Record<string, unknown>;
|
|
22
|
-
features?: {
|
|
23
|
-
voice_enabled?: boolean;
|
|
24
|
-
self_hosted?: boolean;
|
|
25
|
-
stripe_enabled?: boolean;
|
|
26
|
-
sms_mfa_enabled?: boolean;
|
|
27
|
-
manual_review_enabled?: boolean;
|
|
28
|
-
[key: string]: unknown;
|
|
29
|
-
};
|
|
30
|
-
push?: Record<string, unknown>;
|
|
31
|
-
[key: string]: unknown;
|
|
32
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { APIUser } from './user.js';
|
|
2
|
-
import { APIGuildMember } from './user.js';
|
|
3
|
-
import { Snowflake } from '../common/snowflake.js';
|
|
4
|
-
|
|
5
|
-
/** Application command option value (string, number, or boolean). */
|
|
6
|
-
export type APIApplicationCommandOptionValue = string | number | boolean;
|
|
7
|
-
|
|
8
|
-
/** Minimal application command interaction (slash command) payload from the gateway. */
|
|
9
|
-
export interface APIApplicationCommandInteraction {
|
|
10
|
-
id: string;
|
|
11
|
-
application_id: string;
|
|
12
|
-
type: number;
|
|
13
|
-
token: string;
|
|
14
|
-
data?: {
|
|
15
|
-
id?: string;
|
|
16
|
-
name: string;
|
|
17
|
-
type?: number;
|
|
18
|
-
options?: Array<{ name: string; type: number; value?: APIApplicationCommandOptionValue }>;
|
|
19
|
-
};
|
|
20
|
-
guild_id?: string;
|
|
21
|
-
channel_id?: string;
|
|
22
|
-
/** Guild member (when interaction is in a guild). Includes user. */
|
|
23
|
-
member?: APIGuildMember & { guild_id?: Snowflake };
|
|
24
|
-
/** User who ran the command (DM context or fallback). */
|
|
25
|
-
user?: APIUser;
|
|
26
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Snowflake } from '../common/snowflake.js';
|
|
2
|
-
import { APIUser } from './user.js';
|
|
3
|
-
import { APIChannelPartial } from './channel.js';
|
|
4
|
-
|
|
5
|
-
export interface APIGuildPartial {
|
|
6
|
-
id: Snowflake;
|
|
7
|
-
name: string;
|
|
8
|
-
icon?: string | null;
|
|
9
|
-
banner?: string | null;
|
|
10
|
-
splash?: string | null;
|
|
11
|
-
features?: string[];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface APIInvite {
|
|
15
|
-
code: string;
|
|
16
|
-
type: number;
|
|
17
|
-
guild: APIGuildPartial;
|
|
18
|
-
channel: APIChannelPartial;
|
|
19
|
-
inviter?: APIUser | null;
|
|
20
|
-
member_count?: number;
|
|
21
|
-
presence_count?: number;
|
|
22
|
-
expires_at?: string | null;
|
|
23
|
-
temporary?: boolean;
|
|
24
|
-
created_at?: string;
|
|
25
|
-
uses?: number;
|
|
26
|
-
max_uses?: number;
|
|
27
|
-
max_age?: number;
|
|
28
|
-
}
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { Snowflake } from '../common/snowflake.js';
|
|
2
|
-
import { APIUser } from './user.js';
|
|
3
|
-
import { APIGuildMember } from './user.js';
|
|
4
|
-
import { APIEmbed } from './embed.js';
|
|
5
|
-
|
|
6
|
-
export enum MessageType {
|
|
7
|
-
Default = 0,
|
|
8
|
-
RecipientAdd = 1,
|
|
9
|
-
RecipientRemove = 2,
|
|
10
|
-
Call = 3,
|
|
11
|
-
ChannelNameChange = 4,
|
|
12
|
-
ChannelIconChange = 5,
|
|
13
|
-
ChannelPinnedMessage = 6,
|
|
14
|
-
UserJoin = 7,
|
|
15
|
-
Reply = 19,
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export enum MessageFlags {
|
|
19
|
-
SuppressEmbeds = 4,
|
|
20
|
-
SuppressNotifications = 4096,
|
|
21
|
-
VoiceMessage = 8192,
|
|
22
|
-
CompactAttachments = 131072,
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface APIReactionEmoji {
|
|
26
|
-
id: Snowflake | null;
|
|
27
|
-
name: string;
|
|
28
|
-
animated?: boolean | null;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface APIMessageReaction {
|
|
32
|
-
emoji: APIReactionEmoji;
|
|
33
|
-
count: number;
|
|
34
|
-
me?: boolean | null;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/** Reply/forward reference from GET /channels/{id}/messages (type 0 = reply) */
|
|
38
|
-
export interface APIMessageReference {
|
|
39
|
-
channel_id: Snowflake;
|
|
40
|
-
message_id: Snowflake;
|
|
41
|
-
guild_id?: Snowflake | null;
|
|
42
|
-
/** 0 = reply, 1 = forward */
|
|
43
|
-
type?: number;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/** Call metadata for call-type messages */
|
|
47
|
-
export interface APIMessageCall {
|
|
48
|
-
participants: string[];
|
|
49
|
-
ended_timestamp?: string | null;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/** Snapshot of a forwarded message */
|
|
53
|
-
export interface APIMessageSnapshot {
|
|
54
|
-
content?: string | null;
|
|
55
|
-
timestamp: string;
|
|
56
|
-
edited_timestamp?: string | null;
|
|
57
|
-
mentions?: string[] | null;
|
|
58
|
-
mention_roles?: Snowflake[] | null;
|
|
59
|
-
embeds?: APIEmbed[] | null;
|
|
60
|
-
attachments?: APIMessageAttachment[] | null;
|
|
61
|
-
stickers?: APIMessageSticker[] | null;
|
|
62
|
-
type?: number;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/** Bitwise flags for message attachments (when sending, use in attachments metadata). */
|
|
66
|
-
export const MessageAttachmentFlags = {
|
|
67
|
-
/** Renders attachment as spoiler (blurred until clicked) */
|
|
68
|
-
IS_SPOILER: 8,
|
|
69
|
-
/** Attachment contains explicit content */
|
|
70
|
-
CONTAINS_EXPLICIT_MEDIA: 16,
|
|
71
|
-
/** Animated image (e.g. GIF, animated WebP). Renders with EmbedGif / looping behavior. */
|
|
72
|
-
IS_ANIMATED: 32,
|
|
73
|
-
} as const;
|
|
74
|
-
|
|
75
|
-
export interface APIMessageAttachment {
|
|
76
|
-
id: Snowflake;
|
|
77
|
-
filename: string;
|
|
78
|
-
title?: string | null;
|
|
79
|
-
description?: string | null;
|
|
80
|
-
content_type?: string | null;
|
|
81
|
-
/** Hash of attachment content for integrity */
|
|
82
|
-
content_hash?: string | null;
|
|
83
|
-
size: number;
|
|
84
|
-
url?: string | null;
|
|
85
|
-
proxy_url?: string | null;
|
|
86
|
-
width?: number | null;
|
|
87
|
-
height?: number | null;
|
|
88
|
-
/** Base64 placeholder for lazy loading */
|
|
89
|
-
placeholder?: string | null;
|
|
90
|
-
/** MessageAttachmentFlags bitfield */
|
|
91
|
-
flags?: number | null;
|
|
92
|
-
nsfw?: boolean | null;
|
|
93
|
-
duration?: number | null;
|
|
94
|
-
/** Base64 audio waveform for voice messages */
|
|
95
|
-
waveform?: string | null;
|
|
96
|
-
expires_at?: string | null;
|
|
97
|
-
expired?: boolean | null;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export interface APIMessageSticker {
|
|
101
|
-
id: Snowflake;
|
|
102
|
-
name: string;
|
|
103
|
-
description?: string;
|
|
104
|
-
tags?: string[];
|
|
105
|
-
animated?: boolean;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Message from GET /channels/{id}/messages, POST /channels/{id}/messages, PATCH, or gateway MESSAGE_CREATE
|
|
110
|
-
*/
|
|
111
|
-
export interface APIMessage {
|
|
112
|
-
id: Snowflake;
|
|
113
|
-
channel_id: Snowflake;
|
|
114
|
-
guild_id?: Snowflake | null;
|
|
115
|
-
author: APIUser;
|
|
116
|
-
webhook_id?: Snowflake | null;
|
|
117
|
-
type: MessageType;
|
|
118
|
-
flags: number;
|
|
119
|
-
content: string;
|
|
120
|
-
timestamp: string;
|
|
121
|
-
edited_timestamp: string | null;
|
|
122
|
-
pinned: boolean;
|
|
123
|
-
mention_everyone?: boolean;
|
|
124
|
-
tts?: boolean;
|
|
125
|
-
mentions?: APIUser[] | null;
|
|
126
|
-
mention_roles?: Snowflake[] | null;
|
|
127
|
-
embeds?: APIEmbed[] | null;
|
|
128
|
-
attachments?: APIMessageAttachment[] | null;
|
|
129
|
-
stickers?: APIMessageSticker[] | null;
|
|
130
|
-
reactions?: APIMessageReaction[] | null;
|
|
131
|
-
message_reference?: APIMessageReference | null;
|
|
132
|
-
/** Snapshots of forwarded messages */
|
|
133
|
-
message_snapshots?: APIMessageSnapshot[] | null;
|
|
134
|
-
nonce?: string | null;
|
|
135
|
-
/** Call info when type is Call */
|
|
136
|
-
call?: APIMessageCall | null;
|
|
137
|
-
referenced_message?: APIMessage | null;
|
|
138
|
-
/** Author's guild member (gateway MESSAGE_CREATE only, when guild message) */
|
|
139
|
-
member?: APIGuildMember | null;
|
|
140
|
-
}
|