mirror of
https://github.com/ION606/selmer-bot-listener.git
synced 2026-05-14 21:06:55 +00:00
Added the '/reminders' webhook
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
|
||||
hidden = [".config"]
|
||||
run = "node main.js"
|
||||
|
||||
[[hints]]
|
||||
regex = "Error \\[ERR_REQUIRE_ESM\\]"
|
||||
message = "We see that you are using require(...) inside your code. We currently do not support this syntax. Please use 'import' instead when using external modules. (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import)"
|
||||
|
||||
[nix]
|
||||
channel = "stable-21_11"
|
||||
|
||||
[env]
|
||||
XDG_CONFIG_HOME = "/home/runner/.config"
|
||||
PATH = "/home/runner/$REPL_SLUG/.config/npm/node_global/bin:/home/runner/$REPL_SLUG/node_modules/.bin"
|
||||
npm_config_prefix = "/home/runner/$REPL_SLUG/.config/npm/node_global"
|
||||
|
||||
[packager]
|
||||
language = "nodejs"
|
||||
|
||||
[packager.features]
|
||||
packageSearch = true
|
||||
guessImports = true
|
||||
enabledForHosting = false
|
||||
|
||||
[unitTest]
|
||||
language = "nodejs"
|
||||
|
||||
[languages.javascript]
|
||||
pattern = "**/{*.js,*.jsx,*.ts,*.tsx}"
|
||||
|
||||
[languages.javascript.languageServer]
|
||||
start = [ "typescript-language-server", "--stdio" ]
|
||||
|
||||
[debugger]
|
||||
support = true
|
||||
|
||||
[debugger.interactive]
|
||||
transport = "localhost:0"
|
||||
startCommand = [ "dap-node" ]
|
||||
|
||||
[debugger.interactive.initializeMessage]
|
||||
command = "initialize"
|
||||
type = "request"
|
||||
|
||||
[debugger.interactive.initializeMessage.arguments]
|
||||
clientID = "replit"
|
||||
clientName = "replit.com"
|
||||
columnsStartAt1 = true
|
||||
linesStartAt1 = true
|
||||
locale = "en-us"
|
||||
pathFormat = "path"
|
||||
supportsInvalidatedEvent = true
|
||||
supportsProgressReporting = true
|
||||
supportsRunInTerminalRequest = true
|
||||
supportsVariablePaging = true
|
||||
supportsVariableType = true
|
||||
|
||||
[debugger.interactive.launchMessage]
|
||||
command = "launch"
|
||||
type = "request"
|
||||
|
||||
[debugger.interactive.launchMessage.arguments]
|
||||
args = []
|
||||
console = "externalTerminal"
|
||||
cwd = "."
|
||||
environment = []
|
||||
pauseForSourceMap = false
|
||||
program = "./index.js"
|
||||
request = "launch"
|
||||
sourceMaps = true
|
||||
stopOnEntry = false
|
||||
type = "pwa-node"
|
||||
@@ -2,61 +2,86 @@ const path = require("path");
|
||||
const express = require("express");
|
||||
const stripe = require("stripe")(process.env.APIKey);
|
||||
const { MongoClient, ServerApiVersion } = require("mongodb");
|
||||
const { Client, Intents, MessageEmbed } = require('discord.js');
|
||||
const mongouri = process.env.mongooseURI;
|
||||
const token = process.env.token;
|
||||
|
||||
|
||||
// Use body-parser to retrieve the raw body as a buffer
|
||||
const bodyParser = require("body-parser");
|
||||
const endpointSecret = process.env.webhooksecret;
|
||||
|
||||
const bot = new Client({
|
||||
intents: [
|
||||
Intents.FLAGS.GUILDS,
|
||||
Intents.FLAGS.GUILD_MESSAGES,
|
||||
Intents.FLAGS.GUILD_MESSAGE_REACTIONS,
|
||||
Intents.FLAGS.GUILD_VOICE_STATES,
|
||||
Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS,
|
||||
Intents.FLAGS.GUILD_PRESENCES,
|
||||
Intents.FLAGS.GUILD_MEMBERS,
|
||||
Intents.FLAGS.DIRECT_MESSAGES,
|
||||
Intents.FLAGS.DIRECT_MESSAGE_REACTIONS,
|
||||
Intents.FLAGS.DIRECT_MESSAGE_TYPING,
|
||||
],
|
||||
partials: ['CHANNEL']
|
||||
});
|
||||
|
||||
bot.on('ready', async () => {
|
||||
console.log("Bot online!");
|
||||
});
|
||||
bot.login(token);
|
||||
|
||||
const app = express();
|
||||
app.use(express.static("public"));
|
||||
app.use(bodyParser.urlencoded({ extended: true }));
|
||||
|
||||
//Adding the "add customer" function is unecessary as it is handled on the Heroku server
|
||||
|
||||
function createSubscription(obj) {
|
||||
const customer = obj.customer;
|
||||
const plan = obj.plan;
|
||||
const customer = obj.customer;
|
||||
const plan = obj.plan;
|
||||
|
||||
//$5 = tier 1, $10 = tier 2, etc...CHANGE IF ANY VARIEATIONS ARE ADDED!!!
|
||||
const tier = plan.amount / 500;
|
||||
// if (tier != 1 && tier % 2 != 0) { throw `INCORRECT TIER (${tier}) from $${plan.amount}` }; //WRONG
|
||||
//$5 = tier 1, $10 = tier 2, etc...CHANGE IF ANY VARIEATIONS ARE ADDED!!!
|
||||
const tier = plan.amount / 500;
|
||||
// if (tier != 1 && tier % 2 != 0) { throw `INCORRECT TIER (${tier}) from $${plan.amount}` }; //WRONG
|
||||
|
||||
const client = new MongoClient(mongouri, {
|
||||
useNewUrlParser: true,
|
||||
useUnifiedTopology: true,
|
||||
serverApi: ServerApiVersion.v1,
|
||||
});
|
||||
const client = new MongoClient(mongouri, {
|
||||
useNewUrlParser: true,
|
||||
useUnifiedTopology: true,
|
||||
serverApi: ServerApiVersion.v1,
|
||||
});
|
||||
|
||||
client.connect(async (err) => {
|
||||
const d = new Date();
|
||||
const startDateUTC = `${d.getUTCDay()}|${d.getUTCMonth()}|${d.getUTCFullYear()}`;
|
||||
const dbo = client.db("main").collection("authorized");
|
||||
dbo.updateOne({ stripeID: customer }, { $set: { startDateUTC: startDateUTC, paid: true, tier: tier } });
|
||||
});
|
||||
client.connect(async (err) => {
|
||||
const d = new Date();
|
||||
const startDateUTC = `${d.getUTCDay()}|${d.getUTCMonth()}|${d.getUTCFullYear()}`;
|
||||
const dbo = client.db("main").collection("authorized");
|
||||
dbo.updateOne({ stripeID: customer }, { $set: { startDateUTC: startDateUTC, paid: true, tier: tier } });
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function deleteSubscription(obj) {
|
||||
const client = new MongoClient(mongouri, {
|
||||
useNewUrlParser: true,
|
||||
useUnifiedTopology: true,
|
||||
serverApi: ServerApiVersion.v1,
|
||||
});
|
||||
const client = new MongoClient(mongouri, {
|
||||
useNewUrlParser: true,
|
||||
useUnifiedTopology: true,
|
||||
serverApi: ServerApiVersion.v1,
|
||||
});
|
||||
|
||||
client.connect(async (err) => {
|
||||
const customer = obj.customer;
|
||||
const dbo = client.db("main").collection("authorized");
|
||||
dbo.updateOne({ stripeID: customer }, { $set: { startDateUTC: null, paid: false, tier: 0 } });
|
||||
});
|
||||
client.connect(async (err) => {
|
||||
const customer = obj.customer;
|
||||
const dbo = client.db("main").collection("authorized");
|
||||
dbo.updateOne({ stripeID: customer }, { $set: { startDateUTC: null, paid: false, tier: 0 } });
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function changeSubscription(obj) {
|
||||
const upStates = ['trialing', 'active'];
|
||||
const downStates = ['incomplete', 'incomplete_expired', 'past_due', 'canceled', 'unpaid'];
|
||||
|
||||
|
||||
const status = obj.status.trim();
|
||||
|
||||
|
||||
if (upStates.includes(status)) {
|
||||
createSubscription(obj);
|
||||
} else if (downStates.includes(status)) {
|
||||
@@ -66,8 +91,7 @@ function changeSubscription(obj) {
|
||||
|
||||
|
||||
// Match the raw body to content type application/json
|
||||
app.post(
|
||||
"/webhooks",
|
||||
app.post("/webhooks",
|
||||
bodyParser.raw({ type: "application/json" }), (request, response) => {
|
||||
const sig = request.headers["stripe-signature"];
|
||||
|
||||
@@ -106,6 +130,54 @@ app.post(
|
||||
}
|
||||
);
|
||||
|
||||
//ReminderS format [{ guildId: string, userId: string, event: [name, description, location], time: string (in UTC format), offset: int (in ms) }]
|
||||
app.post('/reminders', async (req, res) => {
|
||||
const code = req.headers['botcode'];
|
||||
if (code != process.env.accesscode) {
|
||||
return res.sendStatus(500);
|
||||
}
|
||||
|
||||
const reminders = JSON.parse(req.headers['reminders'])
|
||||
// return console.log(JSON.parse(req.headers['reminders']), typeof JSON.parse(req.headers['reminders']));
|
||||
|
||||
var user;
|
||||
var guild;
|
||||
var reminder;
|
||||
var timeUTC;
|
||||
|
||||
try {
|
||||
// reminder = JSON.parse(reminders);
|
||||
|
||||
for (i in reminders) {
|
||||
reminder = reminders[i];
|
||||
|
||||
guild = bot.guilds.cache.get(reminder.guildId);
|
||||
user = guild.members.cache.get(reminder.userId);
|
||||
|
||||
if (!user || !guild) { console.error(`Unknown user (guildId: ${reminder.guildId} userId: ${reminder.userId})`); return res.sendStatus(500); }
|
||||
|
||||
timeUTC = Number(reminder.time) + Number(reminder.offset);
|
||||
|
||||
let temp = `${reminder.name} is coming up in <t:${timeUTC}:R> at <t:${timeUTC}:F>`;
|
||||
const embd = new MessageEmbed()
|
||||
.setAuthor({ name: "Selmer Bot", url: "", iconURL: bot.user.displayAvatarURL() })
|
||||
.setTitle(temp)
|
||||
.setDescription(`Description: ${reminder.description}`)
|
||||
.addFields(
|
||||
{ name: 'Time', value: `<t:${timeUTC}:F>` },
|
||||
{ name: 'Location', value: `${reminder.location}` },
|
||||
{ name: 'Link', value: `${reminder.link}` }
|
||||
);
|
||||
|
||||
user.send({ embeds: [embd] });
|
||||
}
|
||||
|
||||
res.sendStatus(200);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
res.sendStatus(500);
|
||||
}
|
||||
});
|
||||
const listener = app.listen(process.env.PORT, () => {
|
||||
console.log("Your app is listening on port " + listener.address().port);
|
||||
});
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
../mime/cli.js
|
||||
+1036
File diff suppressed because it is too large
Load Diff
+246
@@ -0,0 +1,246 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
# [@discordjs/builders@0.16.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@0.15.0...@discordjs/builders@0.16.0) - (2022-07-17)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- Slash command name regex (#8265) ([32f9056](https://github.com/discordjs/discord.js/commit/32f9056b15edede3bab07de96afb4b56d3a9ecca))
|
||||
- **TextInputBuilder:** Parse `custom_id`, `label`, and `style` (#8216) ([2d9dfa3](https://github.com/discordjs/discord.js/commit/2d9dfa3c6ea4bb972da2f7e088d148b798c866d9))
|
||||
|
||||
## Documentation
|
||||
|
||||
- Add codecov coverage badge to readmes (#8226) ([f6db285](https://github.com/discordjs/discord.js/commit/f6db285c073898a749fe4591cbd4463d1896daf5))
|
||||
|
||||
## Features
|
||||
|
||||
- **builder:** Add max min length in string option (#8214) ([96c8d21](https://github.com/discordjs/discord.js/commit/96c8d21f95eb366c46ae23505ba9054f44821b25))
|
||||
- Codecov (#8219) ([f10f4cd](https://github.com/discordjs/discord.js/commit/f10f4cdcd88ca6be7ec735ed3a415ba13da83db0))
|
||||
- **docgen:** Update typedoc ([b3346f4](https://github.com/discordjs/discord.js/commit/b3346f4b9b3d4f96443506643d4631dc1c6d7b21))
|
||||
- Website (#8043) ([127931d](https://github.com/discordjs/discord.js/commit/127931d1df7a2a5c27923c2f2151dbf3824e50cc))
|
||||
- **docgen:** Typescript support ([3279b40](https://github.com/discordjs/discord.js/commit/3279b40912e6aa61507bedb7db15a2b8668de44b))
|
||||
- Docgen package (#8029) ([8b979c0](https://github.com/discordjs/discord.js/commit/8b979c0245c42fd824d8e98745ee869f5360fc86))
|
||||
|
||||
## Refactor
|
||||
|
||||
- **builder:** Remove `unsafe*Builder`s (#8074) ([a4d1862](https://github.com/discordjs/discord.js/commit/a4d18629828234f43f03d1bd4851d4b727c6903b))
|
||||
- Remove @sindresorhus/is as it's now esm only (#8133) ([c6f285b](https://github.com/discordjs/discord.js/commit/c6f285b7b089b004776fbeb444fe973a68d158d8))
|
||||
- Move all the config files to root (#8033) ([769ea0b](https://github.com/discordjs/discord.js/commit/769ea0bfe78c4f1d413c6b397c604ffe91e39c6a))
|
||||
|
||||
## Typings
|
||||
|
||||
- Remove expect error (#8242) ([7e6dbaa](https://github.com/discordjs/discord.js/commit/7e6dbaaed900c07d1a04e23bbbf9cd0d1b0501c5))
|
||||
- **builder:** Remove casting (#8241) ([8198da5](https://github.com/discordjs/discord.js/commit/8198da5cd0898e06954615a2287853321e7ebbd4))
|
||||
|
||||
# [@discordjs/builders@0.15.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@0.14.0...@discordjs/builders@0.15.0) - (2022-06-06)
|
||||
|
||||
## Features
|
||||
|
||||
- Allow builders to accept rest params and arrays (#7874) ([ad75be9](https://github.com/discordjs/discord.js/commit/ad75be9a9cf90c8624495df99b75177e6c24022f))
|
||||
- Use vitest instead of jest for more speed ([8d8e6c0](https://github.com/discordjs/discord.js/commit/8d8e6c03decd7352a2aa180f6e5bc1a13602539b))
|
||||
- Add scripts package for locally used scripts ([f2ae1f9](https://github.com/discordjs/discord.js/commit/f2ae1f9348bfd893332a9060f71a8a5f272a1b8b))
|
||||
|
||||
# [@discordjs/builders@0.15.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@0.14.0...@discordjs/builders@0.15.0) - (2022-06-05)
|
||||
|
||||
## Features
|
||||
|
||||
- Allow builders to accept rest params and arrays (#7874) ([ad75be9](https://github.com/discordjs/discord.js/commit/ad75be9a9cf90c8624495df99b75177e6c24022f))
|
||||
- Use vitest instead of jest for more speed ([8d8e6c0](https://github.com/discordjs/discord.js/commit/8d8e6c03decd7352a2aa180f6e5bc1a13602539b))
|
||||
- Add scripts package for locally used scripts ([f2ae1f9](https://github.com/discordjs/discord.js/commit/f2ae1f9348bfd893332a9060f71a8a5f272a1b8b))
|
||||
|
||||
# [@discordjs/builders@0.14.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@0.13.0...@discordjs/builders@0.14.0) - (2022-06-04)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- **builders:** Leftover invalid null type ([8a7cd10](https://github.com/discordjs/discord.js/commit/8a7cd10554a2a71cd2fe7f6a177b5f4f43464348))
|
||||
- **SlashCommandBuilder:** Import `Permissions` correctly (#7921) ([7ce641d](https://github.com/discordjs/discord.js/commit/7ce641d33a4af6586d5e7beffbe7d38619dcf1a2))
|
||||
- Add localizations for subcommand builders and option choices (#7862) ([c1b5e73](https://github.com/discordjs/discord.js/commit/c1b5e731daa9cbbfca03a046e47cb1221ee1ed7c))
|
||||
|
||||
## Features
|
||||
|
||||
- Export types from `interactions/slashCommands/mixins` (#7942) ([68d5169](https://github.com/discordjs/discord.js/commit/68d5169f66c96f8fe5be17a1c01cdd5155607ab2))
|
||||
- **builders:** Add new command permissions v2 (#7861) ([de3f157](https://github.com/discordjs/discord.js/commit/de3f1573f07dda294cc0fbb1ca4b659eb2388a12))
|
||||
- **builders:** Improve embed errors and predicates (#7795) ([ec8d87f](https://github.com/discordjs/discord.js/commit/ec8d87f93272cc9987f9613735c0361680c4ed1e))
|
||||
|
||||
## Refactor
|
||||
|
||||
- Use arrays instead of rest parameters for builders (#7759) ([29293d7](https://github.com/discordjs/discord.js/commit/29293d7bbb5ed463e52e5a5853817e5a09cf265b))
|
||||
|
||||
## Styling
|
||||
|
||||
- Cleanup tests and tsup configs ([6b8ef20](https://github.com/discordjs/discord.js/commit/6b8ef20cb3af5b5cfd176dd0aa0a1a1e98551629))
|
||||
|
||||
# [@discordjs/builders@0.13.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@0.12.0...@discordjs/builders@0.13.0) - (2022-04-17)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- Validate select menu options (#7566) ([b1d63d9](https://github.com/discordjs/discord.js/commit/b1d63d919a61f309ac89f27016b0f148678dac2b))
|
||||
- **SelectMenu:** Set `placeholder` max to 150 (#7538) ([dcd4797](https://github.com/discordjs/discord.js/commit/dcd479767b6ec980a373f2ea1f22754f41661c1e))
|
||||
- Only check `instanceof Component` once (#7546) ([0aa4851](https://github.com/discordjs/discord.js/commit/0aa48516a4e33497e8e8dc50da164a57cdee09d3))
|
||||
- **builders:** Allow negative min/max value of number/integer option (#7484) ([3baa340](https://github.com/discordjs/discord.js/commit/3baa340821b8ecf8a16253bc0917a1033250d7c9))
|
||||
- **components:** SetX should take rest parameters (#7461) ([3617359](https://github.com/discordjs/discord.js/commit/36173590a712f041b087b7882054805a8bd42dae))
|
||||
- Unsafe embed builder field normalization (#7418) ([b936103](https://github.com/discordjs/discord.js/commit/b936103395121cb21a8c616f669ddab1d2efb0f1))
|
||||
- Fix some typos (#7393) ([92a04f4](https://github.com/discordjs/discord.js/commit/92a04f4d98f6c6760214034cc8f5a1eaa78893c7))
|
||||
- **builders:** Make type optional in constructor (#7391) ([4abb28c](https://github.com/discordjs/discord.js/commit/4abb28c0a1256c57a60369a6b8ec9e98c265b489))
|
||||
- Don't create new instances of builders classes (#7343) ([d6b56d0](https://github.com/discordjs/discord.js/commit/d6b56d0080c4c5f8ace731f1e8bcae0c9d3fb5a5))
|
||||
|
||||
## Documentation
|
||||
|
||||
- Completely fix builders example link (#7543) ([1a14c0c](https://github.com/discordjs/discord.js/commit/1a14c0ca562ea173d363a770a0437209f461fd23))
|
||||
- Add slash command builders example, fixes #7338 (#7339) ([3ae6f3c](https://github.com/discordjs/discord.js/commit/3ae6f3c313091151245d6e6b52337b459ecfc765))
|
||||
|
||||
## Features
|
||||
|
||||
- Slash command localization for builders (#7683) ([40b9a1d](https://github.com/discordjs/discord.js/commit/40b9a1d67d0b508ec593e030913acd8161cd17f8))
|
||||
- Add API v10 support (#7477) ([72577c4](https://github.com/discordjs/discord.js/commit/72577c4bfd02524a27afb6ff4aebba9301a690d3))
|
||||
- Add support for module: NodeNext in TS and ESM (#7598) ([8f1986a](https://github.com/discordjs/discord.js/commit/8f1986a6aa98365e09b00e84ad5f9f354ab61f3d))
|
||||
- Add Modals and Text Inputs (#7023) ([ed92015](https://github.com/discordjs/discord.js/commit/ed920156344233241a21b0c0b99736a3a855c23c))
|
||||
- Add missing `v13` component methods (#7466) ([f7257f0](https://github.com/discordjs/discord.js/commit/f7257f07655076eabfe355cb6a53260b39ca9670))
|
||||
- **builders:** Add attachment command option type (#7203) ([ae0f35f](https://github.com/discordjs/discord.js/commit/ae0f35f51d68dfa5a7dc43d161ef9365171debdb))
|
||||
- **components:** Add unsafe message component builders (#7387) ([6b6222b](https://github.com/discordjs/discord.js/commit/6b6222bf513d1ee8cd98fba0ad313def560b864f))
|
||||
- **embed:** Add setFields (#7322) ([bcc5cda](https://github.com/discordjs/discord.js/commit/bcc5cda8a902ddb28c7e3578e0f29b4272832624))
|
||||
|
||||
## Refactor
|
||||
|
||||
- Remove nickname parsing (#7736) ([78a3afc](https://github.com/discordjs/discord.js/commit/78a3afcd7fdac358e06764cc0d675e1215c785f3))
|
||||
- Replace zod with shapeshift (#7547) ([3c0bbac](https://github.com/discordjs/discord.js/commit/3c0bbac82fa9988af4a62ff00c66d149fbe6b921))
|
||||
- Remove store channels (#7634) ([aedddb8](https://github.com/discordjs/discord.js/commit/aedddb875e740e1f1bd77f06ce1b361fd3b7bc36))
|
||||
- Allow builders to accept emoji strings (#7616) ([fb9a9c2](https://github.com/discordjs/discord.js/commit/fb9a9c221121ee1c7986f9c775b77b9691a0ae15))
|
||||
- Don't return builders from API data (#7584) ([549716e](https://github.com/discordjs/discord.js/commit/549716e4fcec89ca81216a6d22aa8e623175e37a))
|
||||
- Remove obsolete builder methods (#7590) ([10607db](https://github.com/discordjs/discord.js/commit/10607dbdafe257c5cbf5b952b7eecec4919e8b4a))
|
||||
- **Embed:** Remove add field (#7522) ([8478d2f](https://github.com/discordjs/discord.js/commit/8478d2f4de9ac013733850cbbc67902f7c5abc55))
|
||||
- Make `data` public in builders (#7486) ([ba31203](https://github.com/discordjs/discord.js/commit/ba31203a0ad96e0a00f8312c397889351e4c5cfd))
|
||||
- **embed:** Remove array support in favor of rest params (#7498) ([b3fa2ec](https://github.com/discordjs/discord.js/commit/b3fa2ece402839008738ad3adce3db958445838d))
|
||||
- **components:** Default set boolean methods to true (#7502) ([b122149](https://github.com/discordjs/discord.js/commit/b12214922cea2f43afbe6b1555a74a3c8e16f798))
|
||||
- Make public builder props getters (#7422) ([e8252ed](https://github.com/discordjs/discord.js/commit/e8252ed3b981a4b7e4013f12efadd2f5d9318d3e))
|
||||
- **builders-methods:** Make methods consistent (#7395) ([f495364](https://github.com/discordjs/discord.js/commit/f4953647ff9f39127978c73bf8a62c08462802ca))
|
||||
- Remove conditional autocomplete option return types (#7396) ([0909824](https://github.com/discordjs/discord.js/commit/09098240bfb13b8afafa4ab549f06d236e0ff1c9))
|
||||
- **embed:** Mark properties as readonly (#7332) ([31768fc](https://github.com/discordjs/discord.js/commit/31768fcd69ed5b4566a340bda89ce881418e8272))
|
||||
|
||||
## Typings
|
||||
|
||||
- Fix regressions (#7649) ([5748dbe](https://github.com/discordjs/discord.js/commit/5748dbe08783beb80c526de38ccd105eb0e82664))
|
||||
|
||||
# [@discordjs/builders@0.12.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@0.11.0...@discordjs/builders@0.12.0) - (2022-01-24)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- **builders:** Dont export `Button` component stuff twice (#7289) ([86d9d06](https://github.com/discordjs/discord.js/commit/86d9d0674347c08d056cd054cb4ce4253195bf94))
|
||||
|
||||
## Documentation
|
||||
|
||||
- **SlashCommandSubcommands:** Updating old links from Discord developer portal (#7224) ([bd7a6f2](https://github.com/discordjs/discord.js/commit/bd7a6f265212624199fb0b2ddc8ece39759c63de))
|
||||
|
||||
## Features
|
||||
|
||||
- Add components to /builders (#7195) ([2bb40fd](https://github.com/discordjs/discord.js/commit/2bb40fd767cf5918e3ba422ff73082734bfa05b0))
|
||||
|
||||
## Typings
|
||||
|
||||
- Make `required` a boolean (#7307) ([c10afea](https://github.com/discordjs/discord.js/commit/c10afeadc702ab98bec5e077b3b92494a9596f9c))
|
||||
|
||||
# [0.11.0](https://github.com/discordjs/builders/compare/v0.10.0...v0.11.0) (2021-12-29)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- **ApplicationCommandOptions:** clean up code for builder options ([#68](https://github.com/discordjs/builders/issues/68)) ([b5d0b15](https://github.com/discordjs/builders/commit/b5d0b157b1262bd01fa011f8e0cf33adb82776e7))
|
||||
|
||||
# [0.10.0](https://github.com/discordjs/builders/compare/v0.9.0...v0.10.0) (2021-12-24)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- use zod instead of ow for max/min option validation ([#66](https://github.com/discordjs/builders/issues/66)) ([beb35fb](https://github.com/discordjs/builders/commit/beb35fb1f65bd6be2321e17cc792f67e8615fd48))
|
||||
|
||||
## Features
|
||||
|
||||
- add max/min option for int and number builder options ([#47](https://github.com/discordjs/builders/issues/47)) ([2e1e860](https://github.com/discordjs/builders/commit/2e1e860b46e3453398b20df63dabb6d4325e32d1))
|
||||
|
||||
# [0.9.0](https://github.com/discordjs/builders/compare/v0.8.2...v0.9.0) (2021-12-02)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- replace ow with zod ([#58](https://github.com/discordjs/builders/issues/58)) ([0b6fb81](https://github.com/discordjs/builders/commit/0b6fb8161b858e42781855fb73aaa873fec58160))
|
||||
|
||||
## Features
|
||||
|
||||
- **SlashCommandBuilder:** add autocomplete ([#53](https://github.com/discordjs/builders/issues/53)) ([05b07a7](https://github.com/discordjs/builders/commit/05b07a7e88848188c27d7380d9f948cba25ef778))
|
||||
|
||||
## [0.8.2](https://github.com/discordjs/builders/compare/v0.8.1...v0.8.2) (2021-10-30)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- downgrade ow because of esm issues ([#55](https://github.com/discordjs/builders/issues/55)) ([3722d2c](https://github.com/discordjs/builders/commit/3722d2c1109a7a5c0abad63c1a7eb944df6e46c8))
|
||||
|
||||
## [0.8.1](https://github.com/discordjs/builders/compare/v0.8.0...v0.8.1) (2021-10-29)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- documentation ([e33ec8d](https://github.com/discordjs/builders/commit/e33ec8dfd5785312f82e0afb017a3dac614fd71d))
|
||||
|
||||
# [0.7.0](https://github.com/discordjs/builders/compare/v0.6.0...v0.7.0) (2021-10-18)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- properly type `toJSON` methods ([#34](https://github.com/discordjs/builders/issues/34)) ([7723ad0](https://github.com/discordjs/builders/commit/7723ad0da169386e638188de220451a97513bc25))
|
||||
|
||||
## Features
|
||||
|
||||
- **ContextMenus:** add context menu command builder ([#29](https://github.com/discordjs/builders/issues/29)) ([f0641e5](https://github.com/discordjs/builders/commit/f0641e55733de8992600f3082bcf054e6f815cf7))
|
||||
- add support for channel types on channel options ([#41](https://github.com/discordjs/builders/issues/41)) ([f6c187e](https://github.com/discordjs/builders/commit/f6c187e0ad6ebe03e65186ece3e95cb1db5aeb50))
|
||||
|
||||
# [0.6.0](https://github.com/discordjs/builders/compare/v0.5.0...v0.6.0) (2021-08-24)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- **SlashCommandBuilder:** allow subcommands and groups to coexist at the root level ([#26](https://github.com/discordjs/builders/issues/26)) ([0be4daf](https://github.com/discordjs/builders/commit/0be4dafdfc0b5747c880be0078c00ada913eb4fb))
|
||||
|
||||
## Features
|
||||
|
||||
- create `Embed` builder ([#11](https://github.com/discordjs/builders/issues/11)) ([eb942a4](https://github.com/discordjs/builders/commit/eb942a4d1f3bcec9a4e370b6af602a713ad8f9b7))
|
||||
- **SlashCommandBuilder:** create setDefaultPermission function ([#19](https://github.com/discordjs/builders/issues/19)) ([5d53759](https://github.com/discordjs/builders/commit/5d537593937a8da330153ce4711b7d093a80330e))
|
||||
- **SlashCommands:** add number option type ([#23](https://github.com/discordjs/builders/issues/23)) ([1563991](https://github.com/discordjs/builders/commit/1563991d421bb07bf7a412c87e7613692d770f04))
|
||||
|
||||
# [0.5.0](https://github.com/discordjs/builders/compare/v0.3.0...v0.5.0) (2021-08-10)
|
||||
|
||||
## Features
|
||||
|
||||
- **Formatters:** add `formatEmoji` ([#20](https://github.com/discordjs/builders/issues/20)) ([c3d8bb5](https://github.com/discordjs/builders/commit/c3d8bb5363a1d46b45c0def4277da6921e2ba209))
|
||||
|
||||
# [0.4.0](https://github.com/discordjs/builders/compare/v0.3.0...v0.4.0) (2021-08-05)
|
||||
|
||||
## Features
|
||||
|
||||
- `sub command` => `subcommand` ([#18](https://github.com/discordjs/builders/pull/18)) ([95599c5](https://github.com/discordjs/builders/commit/95599c5b5366ebd054c4c277c52f1a44cda1209d))
|
||||
|
||||
# [0.3.0](https://github.com/discordjs/builders/compare/v0.2.0...v0.3.0) (2021-08-01)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- **Shrug:** Update comment ([#14](https://github.com/discordjs/builders/issues/14)) ([6fa6c40](https://github.com/discordjs/builders/commit/6fa6c405f2ea733811677d3d1bfb1e2806d504d5))
|
||||
- shrug face rendering ([#13](https://github.com/discordjs/builders/issues/13)) ([6ad24ec](https://github.com/discordjs/builders/commit/6ad24ecd96c82b0f576e78e9e53fc7bf9c36ef5d))
|
||||
|
||||
## Features
|
||||
|
||||
- **formatters:** mentions ([#9](https://github.com/discordjs/builders/issues/9)) ([f83fe99](https://github.com/discordjs/builders/commit/f83fe99b83188ed999845751ffb005c687dbd60a))
|
||||
- **Formatters:** Add a spoiler function ([#16](https://github.com/discordjs/builders/issues/16)) ([c213a6a](https://github.com/discordjs/builders/commit/c213a6abb114f65653017a4edec4bdba2162d771))
|
||||
- **SlashCommands:** add slash command builders ([#3](https://github.com/discordjs/builders/issues/3)) ([6aa3af0](https://github.com/discordjs/builders/commit/6aa3af07b0ee342fff91f080914bb12b3ab773f8))
|
||||
- shrug, tableflip and unflip strings ([#5](https://github.com/discordjs/builders/issues/5)) ([de5fa82](https://github.com/discordjs/builders/commit/de5fa823cd6f1feba5b2d0a63b2cb1761dfd1814))
|
||||
|
||||
# [0.2.0](https://github.com/discordjs/builders/compare/v0.1.1...v0.2.0) (2021-07-03)
|
||||
|
||||
## Features
|
||||
|
||||
- **Formatters:** added `hyperlink` and `hideLinkEmbed` ([#4](https://github.com/discordjs/builders/issues/4)) ([c532daf](https://github.com/discordjs/builders/commit/c532daf2ba2feae75bf9668f63462e96a5314cff))
|
||||
|
||||
# [0.1.1](https://github.com/discordjs/builders/compare/v0.1.0...v0.1.1) (2021-06-30)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- **Deps:** added `tslib` as dependency ([#2](https://github.com/discordjs/builders/issues/2)) ([5576ff3](https://github.com/discordjs/builders/commit/5576ff3b67136b957bed0ab8a4c655d5de322813))
|
||||
|
||||
# 0.1.0 (2021-06-30)
|
||||
|
||||
## Features
|
||||
|
||||
- added message formatters ([#1](https://github.com/discordjs/builders/issues/1)) ([765e46d](https://github.com/discordjs/builders/commit/765e46dac96c4e49d350243e5fad34c2bc738a7c))
|
||||
+191
@@ -0,0 +1,191 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Copyright 2021 Noel Buechler
|
||||
Copyright 2021 Vlad Frangu
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
<div align="center">
|
||||
<br />
|
||||
<p>
|
||||
<a href="https://discord.js.org"><img src="https://discord.js.org/static/logo.svg" width="546" alt="discord.js" /></a>
|
||||
</p>
|
||||
<br />
|
||||
<p>
|
||||
<a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
|
||||
<a href="https://www.npmjs.com/package/@discordjs/builders"><img src="https://img.shields.io/npm/v/@discordjs/builders.svg?maxAge=3600" alt="npm version" /></a>
|
||||
<a href="https://www.npmjs.com/package/@discordjs/builders"><img src="https://img.shields.io/npm/dt/@discordjs/builders.svg?maxAge=3600" alt="npm downloads" /></a>
|
||||
<a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/test.yml/badge.svg" alt="Build status" /></a>
|
||||
<a href="https://codecov.io/gh/discordjs/discord.js" ><img src="https://codecov.io/gh/discordjs/discord.js/branch/main/graph/badge.svg?precision=2&flag=builders" alt="Code coverage" /></a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
## Installation
|
||||
|
||||
**Node.js 16.9.0 or newer is required.**
|
||||
|
||||
```sh-session
|
||||
npm install @discordjs/builders
|
||||
yarn add @discordjs/builders
|
||||
pnpm add @discordjs/builders
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
Here are some examples for the builders and utilities you can find in this package:
|
||||
|
||||
- [Slash Command Builders](https://github.com/discordjs/discord.js/blob/main/packages/builders/docs/examples/Slash%20Command%20Builders.md)
|
||||
|
||||
## Links
|
||||
|
||||
- [Website](https://discord.js.org/) ([source](https://github.com/discordjs/discord.js/tree/main/packages/website))
|
||||
- [Documentation](https://discord.js.org/#/docs/builders)
|
||||
- [Guide](https://discordjs.guide/) ([source](https://github.com/discordjs/guide))
|
||||
See also the [Update Guide](https://discordjs.guide/additional-info/changes-in-v13.html), including updated and removed items in the library.
|
||||
- [discord.js Discord server](https://discord.gg/djs)
|
||||
- [Discord API Discord server](https://discord.gg/discord-api)
|
||||
- [GitHub](https://github.com/discordjs/discord.js/tree/main/packages/builders)
|
||||
- [npm](https://www.npmjs.com/package/@discordjs/builders)
|
||||
- [Related libraries](https://discord.com/developers/docs/topics/community-resources#libraries)
|
||||
|
||||
## Contributing
|
||||
|
||||
Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
|
||||
[documentation](https://discord.js.org/#/docs/builders).
|
||||
See [the contribution guide](https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md) if you'd like to submit a PR.
|
||||
|
||||
## Help
|
||||
|
||||
If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle
|
||||
nudge in the right direction, please don't hesitate to join our official [discord.js Server](https://discord.gg/djs).
|
||||
+1406
File diff suppressed because it is too large
Load Diff
+1557
File diff suppressed because it is too large
Load Diff
+1
File diff suppressed because one or more lines are too long
+1482
File diff suppressed because it is too large
Load Diff
+1
File diff suppressed because one or more lines are too long
+21
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 vladfrangu
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
# Discord API Types
|
||||
|
||||
[](https://github.com/discordjs/discord-api-types)
|
||||
|
||||
[](https://github.com/discordjs/discord-api-types/blob/main/LICENSE.md)
|
||||
[](https://www.npmjs.com/package/discord-api-types)
|
||||
[](https://deno.land/x/discord_api_types)
|
||||
[](https://www.patreon.com/vladfrangu)
|
||||
[](https://ko-fi.com/wolfgalvlad)
|
||||
[](https://github.com/sponsors/vladfrangu)
|
||||
[](https://vercel.com?utm_source=discordjs&utm_campaign=oss)
|
||||
|
||||
Simple type definitions for the [Discord API](https://discord.com/developers/docs/intro).
|
||||
|
||||
## Installation
|
||||
|
||||
Install with [npm](https://www.npmjs.com/) / [yarn](https://yarnpkg.com) / [pnpm](https://pnpm.js.org/):
|
||||
|
||||
```sh
|
||||
npm install discord-api-types
|
||||
yarn add discord-api-types
|
||||
pnpm add discord-api-types
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
||||
You can only import this module by specifying the API version you want to target. Append `/v*` to the import path, where the `*` represents the API version. Below are some examples
|
||||
|
||||
```js
|
||||
const { APIUser } = require('discord-api-types/v10');
|
||||
```
|
||||
|
||||
```ts
|
||||
// TypeScript/ES Module support
|
||||
import { APIUser } from 'discord-api-types/v10';
|
||||
```
|
||||
|
||||
You may also import just certain parts of the module that you need. The possible values are: `globals`, `gateway`, `gateway/v*`, `payloads`, `payloads/v*`, `rest`, `rest/v*`, `rpc`, `rpc/v*`, `utils`, `utils/v*`, `voice`, and `voice/v*`. Below are some examples
|
||||
|
||||
```js
|
||||
const { GatewayVersion } = require('discord-api-types/gateway/v10');
|
||||
```
|
||||
|
||||
```ts
|
||||
// TypeScript/ES Module support
|
||||
import { GatewayVersion } from 'discord-api-types/gateway/v10';
|
||||
```
|
||||
|
||||
> _**Note:** The `v*` exports (`discord-api-types/v*`) include the appropriate version of `gateway`, `payloads`, `rest`, `rpc`, and `utils` you specified, alongside the `globals` exports_
|
||||
|
||||
### Deno
|
||||
|
||||
We also provide typings compatible with the [deno](https://deno.land/) runtime. You have 3 ways you can import them:
|
||||
|
||||
1. Directly from GitHub
|
||||
|
||||
```ts
|
||||
// Importing a specific API version
|
||||
import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/deno/v10.ts';
|
||||
```
|
||||
|
||||
2. From [deno.land/x](https://deno.land/x)
|
||||
|
||||
```ts
|
||||
// Importing a specific API version
|
||||
import { APIUser } from 'https://deno.land/x/discord_api_types/v10.ts';
|
||||
```
|
||||
|
||||
3. From [skypack.dev](https://www.skypack.dev/)
|
||||
|
||||
```ts
|
||||
// Importing a specific API version
|
||||
import { APIUser } from 'https://cdn.skypack.dev/discord-api-types/v10?dts';
|
||||
```
|
||||
|
||||
## Project Structure
|
||||
|
||||
The exports of each API version is split into three main parts:
|
||||
|
||||
- Everything exported with the `API` prefix represents a payload you may get from the REST API _or_ the Gateway.
|
||||
|
||||
- Everything exported with the `Gateway` prefix represents data that ONLY comes from or is directly related to the Gateway.
|
||||
|
||||
- Everything exported with the `REST` prefix represents data that ONLY comes from or is directly related to the REST API.
|
||||
|
||||
- For endpoint options, they will follow the following structure: `REST<HTTP Method><Type><Query|(JSON|FormData)Body|Result>` where the type represents what it will return.
|
||||
|
||||
- For example, `RESTPostAPIChannelMessageJSONBody` or `RESTGetAPIGatewayBotInfoResult`.
|
||||
|
||||
- Some exported types (specifically OAuth2 related ones) may not respect this entire structure due to the nature of the fields. They will start with either `RESTOAuth2` or with something similar to `REST<HTTP Method>OAuth2`
|
||||
|
||||
- If a type ends with `Result`, then it represents the expected result by calling its accompanying route.
|
||||
|
||||
- Types that are exported as `never` usually mean the result will be a `204 No Content`, so you can safely ignore it. This does **not** account for errors.
|
||||
|
||||
- Anything else that is miscellaneous will be exported based on what it represents (for example the `REST` route object).
|
||||
|
||||
- There may be types exported that are identical for all versions. These will be exported as is and can be found in the `globals` file. They will still be prefixed accordingly as described above.
|
||||
|
||||
**A note about how types are documented**: This package will add types only for known and documented properties that are present in Discord's [API Documentation repository](https://github.com/discord/discord-api-docs),
|
||||
that are mentioned in an open pull request, or known through other means _and have received the green light to be used_.
|
||||
Anything else will not be documented (for example client only types).
|
||||
|
||||
With that aside, we may allow certain types that are not documented in the [API Documentation repository](https://github.com/discord/discord-api-docs) on a case by case basis.
|
||||
They will be documented with an `@unstable` tag and are not subject with the same versioning rules.
|
||||
Generated
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#connecting-gateway-url-params
|
||||
*/
|
||||
export interface GatewayURLQuery {
|
||||
v: string;
|
||||
encoding: 'json' | 'etf';
|
||||
compress?: 'zlib-stream';
|
||||
}
|
||||
//# sourceMappingURL=common.d.ts.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC;IACzB,QAAQ,CAAC,EAAE,aAAa,CAAC;CACzB"}
|
||||
Generated
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=common.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"common.js","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":""}
|
||||
Generated
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
export * from './v10';
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,cAAc,OAAO,CAAC"}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
// This file exports all the types available in the recommended gateway version
|
||||
// Thereby, things MAY break in the future. Try sticking to imports from a specific version
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__exportStar(require("./v10"), exports);
|
||||
//# sourceMappingURL=index.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,2FAA2F;;;;;;;;;;;;;;;;AAE3F,wCAAsB"}
|
||||
Generated
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
import mod from "./index.js";
|
||||
|
||||
export default mod;
|
||||
export const GatewayCloseCodes = mod.GatewayCloseCodes;
|
||||
export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
|
||||
export const GatewayIntentBits = mod.GatewayIntentBits;
|
||||
export const GatewayOpcodes = mod.GatewayOpcodes;
|
||||
export const GatewayVersion = mod.GatewayVersion;
|
||||
+1471
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+1
File diff suppressed because one or more lines are too long
+243
@@ -0,0 +1,243 @@
|
||||
"use strict";
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/topics/gateway
|
||||
*/
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0;
|
||||
__exportStar(require("./common"), exports);
|
||||
exports.GatewayVersion = '10';
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
|
||||
*/
|
||||
var GatewayOpcodes;
|
||||
(function (GatewayOpcodes) {
|
||||
/**
|
||||
* An event was dispatched
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["Dispatch"] = 0] = "Dispatch";
|
||||
/**
|
||||
* A bidirectional opcode to maintain an active gateway connection.
|
||||
* Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client.
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["Heartbeat"] = 1] = "Heartbeat";
|
||||
/**
|
||||
* Starts a new session during the initial handshake
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["Identify"] = 2] = "Identify";
|
||||
/**
|
||||
* Update the client's presence
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["PresenceUpdate"] = 3] = "PresenceUpdate";
|
||||
/**
|
||||
* Used to join/leave or move between voice channels
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["VoiceStateUpdate"] = 4] = "VoiceStateUpdate";
|
||||
/**
|
||||
* Resume a previous session that was disconnected
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["Resume"] = 6] = "Resume";
|
||||
/**
|
||||
* You should attempt to reconnect and resume immediately
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["Reconnect"] = 7] = "Reconnect";
|
||||
/**
|
||||
* Request information about offline guild members in a large guild
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["RequestGuildMembers"] = 8] = "RequestGuildMembers";
|
||||
/**
|
||||
* The session has been invalidated. You should reconnect and identify/resume accordingly
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["InvalidSession"] = 9] = "InvalidSession";
|
||||
/**
|
||||
* Sent immediately after connecting, contains the `heartbeat_interval` to use
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["Hello"] = 10] = "Hello";
|
||||
/**
|
||||
* Sent in response to receiving a heartbeat to acknowledge that it has been received
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["HeartbeatAck"] = 11] = "HeartbeatAck";
|
||||
})(GatewayOpcodes = exports.GatewayOpcodes || (exports.GatewayOpcodes = {}));
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
|
||||
*/
|
||||
var GatewayCloseCodes;
|
||||
(function (GatewayCloseCodes) {
|
||||
/**
|
||||
* We're not sure what went wrong. Try reconnecting?
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["UnknownError"] = 4000] = "UnknownError";
|
||||
/**
|
||||
* You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that!
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#payloads-and-opcodes
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["UnknownOpcode"] = 4001] = "UnknownOpcode";
|
||||
/**
|
||||
* You sent an invalid payload to us. Don't do that!
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#sending-payloads
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError";
|
||||
/**
|
||||
* You sent us a payload prior to identifying
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#identify
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated";
|
||||
/**
|
||||
* The account token sent with your identify payload is incorrect
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#identify
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed";
|
||||
/**
|
||||
* You sent more than one identify payload. Don't do that!
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated";
|
||||
/**
|
||||
* The sequence sent when resuming the session was invalid. Reconnect and start a new session
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#resume
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq";
|
||||
/**
|
||||
* Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["RateLimited"] = 4008] = "RateLimited";
|
||||
/**
|
||||
* Your session timed out. Reconnect and start a new one
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["SessionTimedOut"] = 4009] = "SessionTimedOut";
|
||||
/**
|
||||
* You sent us an invalid shard when identifying
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#sharding
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard";
|
||||
/**
|
||||
* The session would have handled too many guilds - you are required to shard your connection in order to connect
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#sharding
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["ShardingRequired"] = 4011] = "ShardingRequired";
|
||||
/**
|
||||
* You sent an invalid version for the gateway
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["InvalidAPIVersion"] = 4012] = "InvalidAPIVersion";
|
||||
/**
|
||||
* You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#gateway-intents
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["InvalidIntents"] = 4013] = "InvalidIntents";
|
||||
/**
|
||||
* You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not
|
||||
* enabled or are not whitelisted for
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#gateway-intents
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#privileged-intents
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents";
|
||||
})(GatewayCloseCodes = exports.GatewayCloseCodes || (exports.GatewayCloseCodes = {}));
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#list-of-intents
|
||||
*/
|
||||
var GatewayIntentBits;
|
||||
(function (GatewayIntentBits) {
|
||||
GatewayIntentBits[GatewayIntentBits["Guilds"] = 1] = "Guilds";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildMembers"] = 2] = "GuildMembers";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildBans"] = 4] = "GuildBans";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildEmojisAndStickers"] = 8] = "GuildEmojisAndStickers";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildIntegrations"] = 16] = "GuildIntegrations";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildWebhooks"] = 32] = "GuildWebhooks";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildInvites"] = 64] = "GuildInvites";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildVoiceStates"] = 128] = "GuildVoiceStates";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildPresences"] = 256] = "GuildPresences";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildMessages"] = 512] = "GuildMessages";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildMessageReactions"] = 1024] = "GuildMessageReactions";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildMessageTyping"] = 2048] = "GuildMessageTyping";
|
||||
GatewayIntentBits[GatewayIntentBits["DirectMessages"] = 4096] = "DirectMessages";
|
||||
GatewayIntentBits[GatewayIntentBits["DirectMessageReactions"] = 8192] = "DirectMessageReactions";
|
||||
GatewayIntentBits[GatewayIntentBits["DirectMessageTyping"] = 16384] = "DirectMessageTyping";
|
||||
GatewayIntentBits[GatewayIntentBits["MessageContent"] = 32768] = "MessageContent";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildScheduledEvents"] = 65536] = "GuildScheduledEvents";
|
||||
})(GatewayIntentBits = exports.GatewayIntentBits || (exports.GatewayIntentBits = {}));
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events
|
||||
*/
|
||||
var GatewayDispatchEvents;
|
||||
(function (GatewayDispatchEvents) {
|
||||
GatewayDispatchEvents["ApplicationCommandPermissionsUpdate"] = "APPLICATION_COMMAND_PERMISSIONS_UPDATE";
|
||||
GatewayDispatchEvents["ChannelCreate"] = "CHANNEL_CREATE";
|
||||
GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE";
|
||||
GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
|
||||
GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_UPDATE";
|
||||
GatewayDispatchEvents["GuildBanAdd"] = "GUILD_BAN_ADD";
|
||||
GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE";
|
||||
GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE";
|
||||
GatewayDispatchEvents["GuildDelete"] = "GUILD_DELETE";
|
||||
GatewayDispatchEvents["GuildEmojisUpdate"] = "GUILD_EMOJIS_UPDATE";
|
||||
GatewayDispatchEvents["GuildIntegrationsUpdate"] = "GUILD_INTEGRATIONS_UPDATE";
|
||||
GatewayDispatchEvents["GuildMemberAdd"] = "GUILD_MEMBER_ADD";
|
||||
GatewayDispatchEvents["GuildMemberRemove"] = "GUILD_MEMBER_REMOVE";
|
||||
GatewayDispatchEvents["GuildMembersChunk"] = "GUILD_MEMBERS_CHUNK";
|
||||
GatewayDispatchEvents["GuildMemberUpdate"] = "GUILD_MEMBER_UPDATE";
|
||||
GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE";
|
||||
GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE";
|
||||
GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE";
|
||||
GatewayDispatchEvents["GuildStickersUpdate"] = "GUILD_STICKERS_UPDATE";
|
||||
GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE";
|
||||
GatewayDispatchEvents["IntegrationCreate"] = "INTEGRATION_CREATE";
|
||||
GatewayDispatchEvents["IntegrationDelete"] = "INTEGRATION_DELETE";
|
||||
GatewayDispatchEvents["IntegrationUpdate"] = "INTEGRATION_UPDATE";
|
||||
GatewayDispatchEvents["InteractionCreate"] = "INTERACTION_CREATE";
|
||||
GatewayDispatchEvents["InviteCreate"] = "INVITE_CREATE";
|
||||
GatewayDispatchEvents["InviteDelete"] = "INVITE_DELETE";
|
||||
GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE";
|
||||
GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE";
|
||||
GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK";
|
||||
GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD";
|
||||
GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE";
|
||||
GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL";
|
||||
GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI";
|
||||
GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE";
|
||||
GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE";
|
||||
GatewayDispatchEvents["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE";
|
||||
GatewayDispatchEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE";
|
||||
GatewayDispatchEvents["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE";
|
||||
GatewayDispatchEvents["Ready"] = "READY";
|
||||
GatewayDispatchEvents["Resumed"] = "RESUMED";
|
||||
GatewayDispatchEvents["ThreadCreate"] = "THREAD_CREATE";
|
||||
GatewayDispatchEvents["ThreadDelete"] = "THREAD_DELETE";
|
||||
GatewayDispatchEvents["ThreadListSync"] = "THREAD_LIST_SYNC";
|
||||
GatewayDispatchEvents["ThreadMembersUpdate"] = "THREAD_MEMBERS_UPDATE";
|
||||
GatewayDispatchEvents["ThreadMemberUpdate"] = "THREAD_MEMBER_UPDATE";
|
||||
GatewayDispatchEvents["ThreadUpdate"] = "THREAD_UPDATE";
|
||||
GatewayDispatchEvents["TypingStart"] = "TYPING_START";
|
||||
GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE";
|
||||
GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
|
||||
GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
|
||||
GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
|
||||
GatewayDispatchEvents["GuildScheduledEventCreate"] = "GUILD_SCHEDULED_EVENT_CREATE";
|
||||
GatewayDispatchEvents["GuildScheduledEventUpdate"] = "GUILD_SCHEDULED_EVENT_UPDATE";
|
||||
GatewayDispatchEvents["GuildScheduledEventDelete"] = "GUILD_SCHEDULED_EVENT_DELETE";
|
||||
GatewayDispatchEvents["GuildScheduledEventUserAdd"] = "GUILD_SCHEDULED_EVENT_USER_ADD";
|
||||
GatewayDispatchEvents["GuildScheduledEventUserRemove"] = "GUILD_SCHEDULED_EVENT_USER_REMOVE";
|
||||
})(GatewayDispatchEvents = exports.GatewayDispatchEvents || (exports.GatewayDispatchEvents = {}));
|
||||
// #endregion Shared
|
||||
//# sourceMappingURL=v10.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"v10.js","sourceRoot":"","sources":["v10.ts"],"names":[],"mappings":"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"}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
import mod from "./v10.js";
|
||||
|
||||
export default mod;
|
||||
export const GatewayCloseCodes = mod.GatewayCloseCodes;
|
||||
export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
|
||||
export const GatewayIntentBits = mod.GatewayIntentBits;
|
||||
export const GatewayOpcodes = mod.GatewayOpcodes;
|
||||
export const GatewayVersion = mod.GatewayVersion;
|
||||
+608
@@ -0,0 +1,608 @@
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/topics/gateway
|
||||
*/
|
||||
import type { APIChannel, APIEmoji, APIGuild, APIGuildMember, APIMessage, APIRole, APIUnavailableGuild, APIUser, GatewayActivity, GatewayPresenceUpdate as RawGatewayPresenceUpdate, GatewayVoiceState, InviteTargetUserType, PresenceUpdateStatus } from '../payloads/v6/index';
|
||||
export * from './common';
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare const GatewayVersion = "6";
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare enum GatewayOPCodes {
|
||||
Dispatch = 0,
|
||||
Heartbeat = 1,
|
||||
Identify = 2,
|
||||
PresenceUpdate = 3,
|
||||
VoiceStateUpdate = 4,
|
||||
Resume = 6,
|
||||
Reconnect = 7,
|
||||
RequestGuildMembers = 8,
|
||||
InvalidSession = 9,
|
||||
Hello = 10,
|
||||
HeartbeatAck = 11
|
||||
}
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare enum GatewayCloseCodes {
|
||||
UnknownError = 4000,
|
||||
UnknownOpCode = 4001,
|
||||
DecodeError = 4002,
|
||||
NotAuthenticated = 4003,
|
||||
AuthenticationFailed = 4004,
|
||||
AlreadyAuthenticated = 4005,
|
||||
InvalidSeq = 4007,
|
||||
RateLimited = 4008,
|
||||
SessionTimedOut = 4009,
|
||||
InvalidShard = 4010,
|
||||
ShardingRequired = 4011,
|
||||
InvalidAPIVersion = 4012,
|
||||
InvalidIntents = 4013,
|
||||
DisallowedIntents = 4014
|
||||
}
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare enum VoiceOPCodes {
|
||||
Identify = 0,
|
||||
SelectProtocol = 1,
|
||||
Ready = 2,
|
||||
Heartbeat = 3,
|
||||
SessionDescription = 4,
|
||||
Speaking = 5,
|
||||
HeartbeatAck = 6,
|
||||
Resume = 7,
|
||||
Hello = 8,
|
||||
Resumed = 9,
|
||||
ClientDisconnect = 13
|
||||
}
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare enum VoiceCloseCodes {
|
||||
UnknownOpCode = 4001,
|
||||
NotAuthenticated = 4003,
|
||||
AuthenticationFailed = 4004,
|
||||
AlreadyAuthenticated = 4005,
|
||||
SessionNoLongerValid = 4006,
|
||||
SessionTimeout = 4009,
|
||||
ServerNotFound = 4011,
|
||||
UnknownProtocol = 4012,
|
||||
Disconnected = 4014,
|
||||
VoiceServerCrashed = 4015,
|
||||
UnknownEncryptionMode = 4016
|
||||
}
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#list-of-intents
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare enum GatewayIntentBits {
|
||||
GUILDS = 1,
|
||||
GUILD_MEMBERS = 2,
|
||||
GUILD_BANS = 4,
|
||||
GUILD_EMOJIS = 8,
|
||||
GUILD_INTEGRATIONS = 16,
|
||||
GUILD_WEBHOOKS = 32,
|
||||
GUILD_INVITES = 64,
|
||||
GUILD_VOICE_STATES = 128,
|
||||
GUILD_PRESENCES = 256,
|
||||
GUILD_MESSAGES = 512,
|
||||
GUILD_MESSAGE_REACTIONS = 1024,
|
||||
GUILD_MESSAGE_TYPING = 2048,
|
||||
DIRECT_MESSAGES = 4096,
|
||||
DIRECT_MESSAGE_REACTIONS = 8192,
|
||||
DIRECT_MESSAGE_TYPING = 16384
|
||||
}
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare enum GatewayDispatchEvents {
|
||||
Ready = "READY",
|
||||
Resumed = "RESUMED",
|
||||
ChannelCreate = "CHANNEL_CREATE",
|
||||
ChannelUpdate = "CHANNEL_UPDATE",
|
||||
ChannelDelete = "CHANNEL_DELETE",
|
||||
ChannelPinsUpdate = "CHANNEL_PINS_UPDATE",
|
||||
GuildCreate = "GUILD_CREATE",
|
||||
GuildUpdate = "GUILD_UPDATE",
|
||||
GuildDelete = "GUILD_DELETE",
|
||||
GuildBanAdd = "GUILD_BAN_ADD",
|
||||
GuildBanRemove = "GUILD_BAN_REMOVE",
|
||||
GuildEmojisUpdate = "GUILD_EMOJIS_UPDATE",
|
||||
GuildIntegrationsUpdate = "GUILD_INTEGRATIONS_UPDATE",
|
||||
GuildMemberAdd = "GUILD_MEMBER_ADD",
|
||||
GuildMemberRemove = "GUILD_MEMBER_REMOVE",
|
||||
GuildMemberUpdate = "GUILD_MEMBER_UPDATE",
|
||||
GuildMembersChunk = "GUILD_MEMBERS_CHUNK",
|
||||
GuildRoleCreate = "GUILD_ROLE_CREATE",
|
||||
GuildRoleUpdate = "GUILD_ROLE_UPDATE",
|
||||
GuildRoleDelete = "GUILD_ROLE_DELETE",
|
||||
InviteCreate = "INVITE_CREATE",
|
||||
InviteDelete = "INVITE_DELETE",
|
||||
MessageCreate = "MESSAGE_CREATE",
|
||||
MessageUpdate = "MESSAGE_UPDATE",
|
||||
MessageDelete = "MESSAGE_DELETE",
|
||||
MessageDeleteBulk = "MESSAGE_DELETE_BULK",
|
||||
MessageReactionAdd = "MESSAGE_REACTION_ADD",
|
||||
MessageReactionRemove = "MESSAGE_REACTION_REMOVE",
|
||||
MessageReactionRemoveAll = "MESSAGE_REACTION_REMOVE_ALL",
|
||||
MessageReactionRemoveEmoji = "MESSAGE_REACTION_REMOVE_EMOJI",
|
||||
PresenceUpdate = "PRESENCE_UPDATE",
|
||||
TypingStart = "TYPING_START",
|
||||
UserUpdate = "USER_UPDATE",
|
||||
VoiceStateUpdate = "VOICE_STATE_UPDATE",
|
||||
VoiceServerUpdate = "VOICE_SERVER_UPDATE",
|
||||
WebhooksUpdate = "WEBHOOKS_UPDATE"
|
||||
}
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewaySendPayload = GatewayHeartbeat | GatewayIdentify | GatewayUpdatePresence | GatewayVoiceStateUpdate | GatewayResume | GatewayRequestGuildMembers;
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayReceivePayload = GatewayHello | GatewayHeartbeatRequest | GatewayHeartbeatAck | GatewayInvalidSession | GatewayReconnect | GatewayDispatchPayload;
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayDispatchPayload = GatewayReadyDispatch | GatewayResumedDispatch | GatewayChannelModifyDispatch | GatewayChannelPinsUpdateDispatch | GatewayGuildModifyDispatch | GatewayGuildDeleteDispatch | GatewayGuildBanModifyDispatch | GatewayGuildEmojisUpdateDispatch | GatewayGuildIntegrationsUpdateDispatch | GatewayGuildMemberAddDispatch | GatewayGuildMemberRemoveDispatch | GatewayGuildMemberUpdateDispatch | GatewayGuildMembersChunkDispatch | GatewayGuildRoleModifyDispatch | GatewayGuildRoleDeleteDispatch | GatewayInviteCreateDispatch | GatewayInviteDeleteDispatch | GatewayMessageCreateDispatch | GatewayMessageUpdateDispatch | GatewayMessageDeleteDispatch | GatewayMessageDeleteBulkDispatch | GatewayMessageReactionAddDispatch | GatewayMessageReactionRemoveDispatch | GatewayMessageReactionRemoveAllDispatch | GatewayMessageReactionRemoveEmojiDispatch | GatewayPresenceUpdateDispatch | GatewayTypingStartDispatch | GatewayUserUpdateDispatch | GatewayVoiceStateUpdateDispatch | GatewayVoiceServerUpdateDispatch | GatewayWebhooksUpdateDispatch;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#hello
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export interface GatewayHello extends NonDispatchPayload {
|
||||
op: GatewayOPCodes.Hello;
|
||||
d: {
|
||||
heartbeat_interval: number;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#heartbeating
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export interface GatewayHeartbeatRequest extends NonDispatchPayload {
|
||||
op: GatewayOPCodes.Heartbeat;
|
||||
d: never;
|
||||
}
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#heartbeating-example-gateway-heartbeat-ack
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export interface GatewayHeartbeatAck extends NonDispatchPayload {
|
||||
op: GatewayOPCodes.HeartbeatAck;
|
||||
d: never;
|
||||
}
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#invalid-session
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export interface GatewayInvalidSession extends NonDispatchPayload {
|
||||
op: GatewayOPCodes.InvalidSession;
|
||||
d: boolean;
|
||||
}
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#reconnect
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export interface GatewayReconnect extends NonDispatchPayload {
|
||||
op: GatewayOPCodes.Reconnect;
|
||||
d: never;
|
||||
}
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#ready
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayReadyDispatch = DataPayload<GatewayDispatchEvents.Ready, {
|
||||
v: number;
|
||||
user: APIUser;
|
||||
session_id: string;
|
||||
private_channels: [];
|
||||
guilds: APIUnavailableGuild[];
|
||||
shard?: [number, number];
|
||||
}>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#resumed
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed, never>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#channel-create
|
||||
* https://discord.com/developers/docs/topics/gateway#channel-update
|
||||
* https://discord.com/developers/docs/topics/gateway#channel-delete
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayChannelModifyDispatch = DataPayload<GatewayDispatchEvents.ChannelCreate | GatewayDispatchEvents.ChannelDelete | GatewayDispatchEvents.ChannelUpdate, APIChannel>;
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch;
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch;
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#channel-pins-update
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayChannelPinsUpdateDispatch = DataPayload<GatewayDispatchEvents.ChannelPinsUpdate, {
|
||||
guild_id?: string;
|
||||
channel_id: string;
|
||||
last_pin_timestamp?: string;
|
||||
}>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-create
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-update
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayGuildModifyDispatch = DataPayload<GatewayDispatchEvents.GuildCreate | GatewayDispatchEvents.GuildUpdate, APIGuild>;
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayGuildCreateDispatch = GatewayGuildModifyDispatch;
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayGuildUpdateDispatch = GatewayGuildModifyDispatch;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-delete
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayGuildDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildDelete, APIUnavailableGuild>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-ban-add
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-ban-remove
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayGuildBanModifyDispatch = DataPayload<GatewayDispatchEvents.GuildBanAdd | GatewayDispatchEvents.GuildBanRemove, {
|
||||
guild_id: string;
|
||||
user: APIUser;
|
||||
}>;
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch;
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-emojis-update
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayGuildEmojisUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildEmojisUpdate, {
|
||||
guild_id: string;
|
||||
emojis: APIEmoji[];
|
||||
}>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-integrations-update
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayGuildIntegrationsUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildIntegrationsUpdate, {
|
||||
guild_id: string;
|
||||
}>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-member-add
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayGuildMemberAddDispatch = DataPayload<GatewayDispatchEvents.GuildMemberAdd, APIGuildMember & {
|
||||
guild_id: string;
|
||||
}>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-member-remove
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayGuildMemberRemoveDispatch = DataPayload<GatewayDispatchEvents.GuildMemberRemove, {
|
||||
guild_id: string;
|
||||
user: APIUser;
|
||||
}>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-member-update
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayGuildMemberUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildMemberUpdate, Omit<APIGuildMember, 'deaf' | 'mute'> & {
|
||||
guild_id: string;
|
||||
}>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-members-chunk
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayGuildMembersChunkDispatch = DataPayload<GatewayDispatchEvents.GuildMembersChunk, {
|
||||
guild_id: string;
|
||||
members: APIGuildMember[];
|
||||
chunk_index?: number;
|
||||
chunk_count?: number;
|
||||
not_found?: unknown[];
|
||||
presences?: RawGatewayPresenceUpdate[];
|
||||
nonce?: string;
|
||||
}>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-role-create
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-role-update
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayGuildRoleModifyDispatch = DataPayload<GatewayDispatchEvents.GuildRoleCreate | GatewayDispatchEvents.GuildRoleUpdate, {
|
||||
guild_id: string;
|
||||
role: APIRole;
|
||||
}>;
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-role-delete
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayGuildRoleDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildRoleDelete, {
|
||||
guild_id: string;
|
||||
role_id: string;
|
||||
}>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#invite-create
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayInviteCreateDispatch = DataPayload<GatewayDispatchEvents.InviteCreate, {
|
||||
channel_id: string;
|
||||
code: string;
|
||||
created_at: number;
|
||||
guild_id?: string;
|
||||
inviter?: APIUser;
|
||||
max_age: number;
|
||||
max_uses: number;
|
||||
target_user?: APIUser;
|
||||
target_user_type?: InviteTargetUserType;
|
||||
temporary: boolean;
|
||||
uses: 0;
|
||||
}>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#invite-delete
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayInviteDeleteDispatch = DataPayload<GatewayDispatchEvents.InviteDelete, {
|
||||
channel_id: string;
|
||||
guild_id?: string;
|
||||
code: string;
|
||||
}>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-create
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayMessageCreateDispatch = DataPayload<GatewayDispatchEvents.MessageCreate, APIMessage>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-update
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayMessageUpdateDispatch = DataPayload<GatewayDispatchEvents.MessageUpdate, {
|
||||
id: string;
|
||||
channel_id: string;
|
||||
} & Partial<APIMessage>>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-delete
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayMessageDeleteDispatch = DataPayload<GatewayDispatchEvents.MessageDelete, {
|
||||
id: string;
|
||||
channel_id: string;
|
||||
guild_id?: string;
|
||||
}>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-delete-bulk
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayMessageDeleteBulkDispatch = DataPayload<GatewayDispatchEvents.MessageDeleteBulk, {
|
||||
ids: string[];
|
||||
channel_id: string;
|
||||
guild_id?: string;
|
||||
}>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-reaction-add
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayMessageReactionAddDispatch = ReactionData<GatewayDispatchEvents.MessageReactionAdd>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayMessageReactionRemoveDispatch = ReactionData<GatewayDispatchEvents.MessageReactionRemove, 'member'>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayMessageReactionRemoveAllDispatch = DataPayload<GatewayDispatchEvents.MessageReactionRemoveAll, MessageReactionRemoveData>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayMessageReactionRemoveEmojiDispatch = DataPayload<GatewayDispatchEvents.MessageReactionRemoveEmoji, MessageReactionRemoveData & {
|
||||
emoji: APIEmoji;
|
||||
}>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#presence-update
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayPresenceUpdateDispatch = DataPayload<GatewayDispatchEvents.PresenceUpdate, RawGatewayPresenceUpdate>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#typing-start
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayTypingStartDispatch = DataPayload<GatewayDispatchEvents.TypingStart, {
|
||||
channel_id: string;
|
||||
guild_id?: string;
|
||||
user_id: string;
|
||||
timestamp: number;
|
||||
member?: APIGuildMember;
|
||||
}>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#user-update
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayUserUpdateDispatch = DataPayload<GatewayDispatchEvents.UserUpdate, APIUser>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#voice-state-update
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayVoiceStateUpdateDispatch = DataPayload<GatewayDispatchEvents.VoiceStateUpdate, GatewayVoiceState>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#voice-server-update
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayVoiceServerUpdateDispatch = DataPayload<GatewayDispatchEvents.VoiceServerUpdate, {
|
||||
token: string;
|
||||
guild_id: string;
|
||||
endpoint: string;
|
||||
}>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#webhooks-update
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export declare type GatewayWebhooksUpdateDispatch = DataPayload<GatewayDispatchEvents.WebhooksUpdate, {
|
||||
guild_id: string;
|
||||
channel_id: string;
|
||||
}>;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#heartbeating
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export interface GatewayHeartbeat {
|
||||
op: GatewayOPCodes.Heartbeat;
|
||||
d: number;
|
||||
}
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#identify-identify-connection-properties
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export interface GatewayIdentifyProperties {
|
||||
$os: string;
|
||||
$browser: string;
|
||||
$device: string;
|
||||
}
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#identify
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export interface GatewayIdentify {
|
||||
op: GatewayOPCodes.Identify;
|
||||
d: {
|
||||
token: string;
|
||||
properties: GatewayIdentifyProperties;
|
||||
compress?: boolean;
|
||||
large_threshold?: number;
|
||||
shard?: [shard_id: number, shard_count: number];
|
||||
presence?: RawGatewayPresenceUpdate;
|
||||
guild_subscriptions?: boolean;
|
||||
intents?: number;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#resume
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export interface GatewayResume {
|
||||
op: GatewayOPCodes.Resume;
|
||||
d: {
|
||||
token: string;
|
||||
session_id: string;
|
||||
seq: number;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#request-guild-members
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export interface GatewayRequestGuildMembers {
|
||||
op: GatewayOPCodes.RequestGuildMembers;
|
||||
d: {
|
||||
guild_id: string | string[];
|
||||
query?: string;
|
||||
limit: number;
|
||||
presences?: boolean;
|
||||
user_ids?: string | string[];
|
||||
nonce?: string;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#update-voice-state
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export interface GatewayVoiceStateUpdate {
|
||||
op: GatewayOPCodes.VoiceStateUpdate;
|
||||
d: {
|
||||
guild_id: string;
|
||||
channel_id: string | null;
|
||||
self_mute: boolean;
|
||||
self_deaf: boolean;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#update-status
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export interface GatewayUpdatePresence {
|
||||
op: GatewayOPCodes.PresenceUpdate;
|
||||
d: GatewayPresenceUpdateData;
|
||||
}
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#update-status-gateway-status-update-structure
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export interface GatewayPresenceUpdateData {
|
||||
since: number | null;
|
||||
game: GatewayActivity | null;
|
||||
status: PresenceUpdateStatus;
|
||||
afk: boolean;
|
||||
}
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
interface BasePayload {
|
||||
op: GatewayOPCodes;
|
||||
s: number;
|
||||
d?: unknown;
|
||||
t?: string;
|
||||
}
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
declare type NonDispatchPayload = Omit<BasePayload, 't'>;
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
interface DataPayload<Event extends GatewayDispatchEvents, D = unknown> extends BasePayload {
|
||||
op: GatewayOPCodes.Dispatch;
|
||||
t: Event;
|
||||
d: D;
|
||||
}
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
declare type ReactionData<E extends GatewayDispatchEvents, O extends string = never> = DataPayload<E, Omit<{
|
||||
user_id: string;
|
||||
channel_id: string;
|
||||
message_id: string;
|
||||
guild_id?: string;
|
||||
member?: APIGuildMember;
|
||||
emoji: APIEmoji;
|
||||
}, O>>;
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
interface MessageReactionRemoveData {
|
||||
channel_id: string;
|
||||
message_id: string;
|
||||
guild_id?: string;
|
||||
}
|
||||
//# sourceMappingURL=v6.d.ts.map
|
||||
Generated
Vendored
+1
File diff suppressed because one or more lines are too long
+167
@@ -0,0 +1,167 @@
|
||||
"use strict";
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/topics/gateway
|
||||
*/
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.VoiceCloseCodes = exports.VoiceOPCodes = exports.GatewayCloseCodes = exports.GatewayOPCodes = exports.GatewayVersion = void 0;
|
||||
__exportStar(require("./common"), exports);
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
exports.GatewayVersion = '6';
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
var GatewayOPCodes;
|
||||
(function (GatewayOPCodes) {
|
||||
GatewayOPCodes[GatewayOPCodes["Dispatch"] = 0] = "Dispatch";
|
||||
GatewayOPCodes[GatewayOPCodes["Heartbeat"] = 1] = "Heartbeat";
|
||||
GatewayOPCodes[GatewayOPCodes["Identify"] = 2] = "Identify";
|
||||
GatewayOPCodes[GatewayOPCodes["PresenceUpdate"] = 3] = "PresenceUpdate";
|
||||
GatewayOPCodes[GatewayOPCodes["VoiceStateUpdate"] = 4] = "VoiceStateUpdate";
|
||||
GatewayOPCodes[GatewayOPCodes["Resume"] = 6] = "Resume";
|
||||
GatewayOPCodes[GatewayOPCodes["Reconnect"] = 7] = "Reconnect";
|
||||
GatewayOPCodes[GatewayOPCodes["RequestGuildMembers"] = 8] = "RequestGuildMembers";
|
||||
GatewayOPCodes[GatewayOPCodes["InvalidSession"] = 9] = "InvalidSession";
|
||||
GatewayOPCodes[GatewayOPCodes["Hello"] = 10] = "Hello";
|
||||
GatewayOPCodes[GatewayOPCodes["HeartbeatAck"] = 11] = "HeartbeatAck";
|
||||
})(GatewayOPCodes = exports.GatewayOPCodes || (exports.GatewayOPCodes = {}));
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
var GatewayCloseCodes;
|
||||
(function (GatewayCloseCodes) {
|
||||
GatewayCloseCodes[GatewayCloseCodes["UnknownError"] = 4000] = "UnknownError";
|
||||
GatewayCloseCodes[GatewayCloseCodes["UnknownOpCode"] = 4001] = "UnknownOpCode";
|
||||
GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError";
|
||||
GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated";
|
||||
GatewayCloseCodes[GatewayCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed";
|
||||
GatewayCloseCodes[GatewayCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated";
|
||||
GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq";
|
||||
GatewayCloseCodes[GatewayCloseCodes["RateLimited"] = 4008] = "RateLimited";
|
||||
GatewayCloseCodes[GatewayCloseCodes["SessionTimedOut"] = 4009] = "SessionTimedOut";
|
||||
GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard";
|
||||
GatewayCloseCodes[GatewayCloseCodes["ShardingRequired"] = 4011] = "ShardingRequired";
|
||||
GatewayCloseCodes[GatewayCloseCodes["InvalidAPIVersion"] = 4012] = "InvalidAPIVersion";
|
||||
GatewayCloseCodes[GatewayCloseCodes["InvalidIntents"] = 4013] = "InvalidIntents";
|
||||
GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents";
|
||||
})(GatewayCloseCodes = exports.GatewayCloseCodes || (exports.GatewayCloseCodes = {}));
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
var VoiceOPCodes;
|
||||
(function (VoiceOPCodes) {
|
||||
VoiceOPCodes[VoiceOPCodes["Identify"] = 0] = "Identify";
|
||||
VoiceOPCodes[VoiceOPCodes["SelectProtocol"] = 1] = "SelectProtocol";
|
||||
VoiceOPCodes[VoiceOPCodes["Ready"] = 2] = "Ready";
|
||||
VoiceOPCodes[VoiceOPCodes["Heartbeat"] = 3] = "Heartbeat";
|
||||
VoiceOPCodes[VoiceOPCodes["SessionDescription"] = 4] = "SessionDescription";
|
||||
VoiceOPCodes[VoiceOPCodes["Speaking"] = 5] = "Speaking";
|
||||
VoiceOPCodes[VoiceOPCodes["HeartbeatAck"] = 6] = "HeartbeatAck";
|
||||
VoiceOPCodes[VoiceOPCodes["Resume"] = 7] = "Resume";
|
||||
VoiceOPCodes[VoiceOPCodes["Hello"] = 8] = "Hello";
|
||||
VoiceOPCodes[VoiceOPCodes["Resumed"] = 9] = "Resumed";
|
||||
VoiceOPCodes[VoiceOPCodes["ClientDisconnect"] = 13] = "ClientDisconnect";
|
||||
})(VoiceOPCodes = exports.VoiceOPCodes || (exports.VoiceOPCodes = {}));
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
var VoiceCloseCodes;
|
||||
(function (VoiceCloseCodes) {
|
||||
VoiceCloseCodes[VoiceCloseCodes["UnknownOpCode"] = 4001] = "UnknownOpCode";
|
||||
VoiceCloseCodes[VoiceCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated";
|
||||
VoiceCloseCodes[VoiceCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed";
|
||||
VoiceCloseCodes[VoiceCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated";
|
||||
VoiceCloseCodes[VoiceCloseCodes["SessionNoLongerValid"] = 4006] = "SessionNoLongerValid";
|
||||
VoiceCloseCodes[VoiceCloseCodes["SessionTimeout"] = 4009] = "SessionTimeout";
|
||||
VoiceCloseCodes[VoiceCloseCodes["ServerNotFound"] = 4011] = "ServerNotFound";
|
||||
VoiceCloseCodes[VoiceCloseCodes["UnknownProtocol"] = 4012] = "UnknownProtocol";
|
||||
VoiceCloseCodes[VoiceCloseCodes["Disconnected"] = 4014] = "Disconnected";
|
||||
VoiceCloseCodes[VoiceCloseCodes["VoiceServerCrashed"] = 4015] = "VoiceServerCrashed";
|
||||
VoiceCloseCodes[VoiceCloseCodes["UnknownEncryptionMode"] = 4016] = "UnknownEncryptionMode";
|
||||
})(VoiceCloseCodes = exports.VoiceCloseCodes || (exports.VoiceCloseCodes = {}));
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#list-of-intents
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
var GatewayIntentBits;
|
||||
(function (GatewayIntentBits) {
|
||||
GatewayIntentBits[GatewayIntentBits["GUILDS"] = 1] = "GUILDS";
|
||||
GatewayIntentBits[GatewayIntentBits["GUILD_MEMBERS"] = 2] = "GUILD_MEMBERS";
|
||||
GatewayIntentBits[GatewayIntentBits["GUILD_BANS"] = 4] = "GUILD_BANS";
|
||||
GatewayIntentBits[GatewayIntentBits["GUILD_EMOJIS"] = 8] = "GUILD_EMOJIS";
|
||||
GatewayIntentBits[GatewayIntentBits["GUILD_INTEGRATIONS"] = 16] = "GUILD_INTEGRATIONS";
|
||||
GatewayIntentBits[GatewayIntentBits["GUILD_WEBHOOKS"] = 32] = "GUILD_WEBHOOKS";
|
||||
GatewayIntentBits[GatewayIntentBits["GUILD_INVITES"] = 64] = "GUILD_INVITES";
|
||||
GatewayIntentBits[GatewayIntentBits["GUILD_VOICE_STATES"] = 128] = "GUILD_VOICE_STATES";
|
||||
GatewayIntentBits[GatewayIntentBits["GUILD_PRESENCES"] = 256] = "GUILD_PRESENCES";
|
||||
GatewayIntentBits[GatewayIntentBits["GUILD_MESSAGES"] = 512] = "GUILD_MESSAGES";
|
||||
GatewayIntentBits[GatewayIntentBits["GUILD_MESSAGE_REACTIONS"] = 1024] = "GUILD_MESSAGE_REACTIONS";
|
||||
GatewayIntentBits[GatewayIntentBits["GUILD_MESSAGE_TYPING"] = 2048] = "GUILD_MESSAGE_TYPING";
|
||||
GatewayIntentBits[GatewayIntentBits["DIRECT_MESSAGES"] = 4096] = "DIRECT_MESSAGES";
|
||||
GatewayIntentBits[GatewayIntentBits["DIRECT_MESSAGE_REACTIONS"] = 8192] = "DIRECT_MESSAGE_REACTIONS";
|
||||
GatewayIntentBits[GatewayIntentBits["DIRECT_MESSAGE_TYPING"] = 16384] = "DIRECT_MESSAGE_TYPING";
|
||||
})(GatewayIntentBits = exports.GatewayIntentBits || (exports.GatewayIntentBits = {}));
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
var GatewayDispatchEvents;
|
||||
(function (GatewayDispatchEvents) {
|
||||
GatewayDispatchEvents["Ready"] = "READY";
|
||||
GatewayDispatchEvents["Resumed"] = "RESUMED";
|
||||
GatewayDispatchEvents["ChannelCreate"] = "CHANNEL_CREATE";
|
||||
GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_UPDATE";
|
||||
GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE";
|
||||
GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
|
||||
GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE";
|
||||
GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE";
|
||||
GatewayDispatchEvents["GuildDelete"] = "GUILD_DELETE";
|
||||
GatewayDispatchEvents["GuildBanAdd"] = "GUILD_BAN_ADD";
|
||||
GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE";
|
||||
GatewayDispatchEvents["GuildEmojisUpdate"] = "GUILD_EMOJIS_UPDATE";
|
||||
GatewayDispatchEvents["GuildIntegrationsUpdate"] = "GUILD_INTEGRATIONS_UPDATE";
|
||||
GatewayDispatchEvents["GuildMemberAdd"] = "GUILD_MEMBER_ADD";
|
||||
GatewayDispatchEvents["GuildMemberRemove"] = "GUILD_MEMBER_REMOVE";
|
||||
GatewayDispatchEvents["GuildMemberUpdate"] = "GUILD_MEMBER_UPDATE";
|
||||
GatewayDispatchEvents["GuildMembersChunk"] = "GUILD_MEMBERS_CHUNK";
|
||||
GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE";
|
||||
GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE";
|
||||
GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE";
|
||||
GatewayDispatchEvents["InviteCreate"] = "INVITE_CREATE";
|
||||
GatewayDispatchEvents["InviteDelete"] = "INVITE_DELETE";
|
||||
GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE";
|
||||
GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE";
|
||||
GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE";
|
||||
GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK";
|
||||
GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD";
|
||||
GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE";
|
||||
GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL";
|
||||
GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI";
|
||||
GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE";
|
||||
GatewayDispatchEvents["TypingStart"] = "TYPING_START";
|
||||
GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE";
|
||||
GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
|
||||
GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
|
||||
GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
|
||||
})(GatewayDispatchEvents = exports.GatewayDispatchEvents || (exports.GatewayDispatchEvents = {}));
|
||||
// #endregion Shared
|
||||
//# sourceMappingURL=v6.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"v6.js","sourceRoot":"","sources":["v6.ts"],"names":[],"mappings":"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"}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import mod from "./v6.js";
|
||||
|
||||
export default mod;
|
||||
export const GatewayCloseCodes = mod.GatewayCloseCodes;
|
||||
export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
|
||||
export const GatewayIntentBits = mod.GatewayIntentBits;
|
||||
export const GatewayOPCodes = mod.GatewayOPCodes;
|
||||
export const GatewayVersion = mod.GatewayVersion;
|
||||
export const VoiceCloseCodes = mod.VoiceCloseCodes;
|
||||
export const VoiceOPCodes = mod.VoiceOPCodes;
|
||||
+1455
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+1
File diff suppressed because one or more lines are too long
+242
@@ -0,0 +1,242 @@
|
||||
"use strict";
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/topics/gateway
|
||||
*/
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0;
|
||||
__exportStar(require("./common"), exports);
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
exports.GatewayVersion = '8';
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
var GatewayOpcodes;
|
||||
(function (GatewayOpcodes) {
|
||||
/**
|
||||
* An event was dispatched
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["Dispatch"] = 0] = "Dispatch";
|
||||
/**
|
||||
* A bidirectional opcode to maintain an active gateway connection.
|
||||
* Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client.
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["Heartbeat"] = 1] = "Heartbeat";
|
||||
/**
|
||||
* Starts a new session during the initial handshake
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["Identify"] = 2] = "Identify";
|
||||
/**
|
||||
* Update the client's presence
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["PresenceUpdate"] = 3] = "PresenceUpdate";
|
||||
/**
|
||||
* Used to join/leave or move between voice channels
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["VoiceStateUpdate"] = 4] = "VoiceStateUpdate";
|
||||
/**
|
||||
* Resume a previous session that was disconnected
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["Resume"] = 6] = "Resume";
|
||||
/**
|
||||
* You should attempt to reconnect and resume immediately
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["Reconnect"] = 7] = "Reconnect";
|
||||
/**
|
||||
* Request information about offline guild members in a large guild
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["RequestGuildMembers"] = 8] = "RequestGuildMembers";
|
||||
/**
|
||||
* The session has been invalidated. You should reconnect and identify/resume accordingly
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["InvalidSession"] = 9] = "InvalidSession";
|
||||
/**
|
||||
* Sent immediately after connecting, contains the `heartbeat_interval` to use
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["Hello"] = 10] = "Hello";
|
||||
/**
|
||||
* Sent in response to receiving a heartbeat to acknowledge that it has been received
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["HeartbeatAck"] = 11] = "HeartbeatAck";
|
||||
})(GatewayOpcodes = exports.GatewayOpcodes || (exports.GatewayOpcodes = {}));
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
var GatewayCloseCodes;
|
||||
(function (GatewayCloseCodes) {
|
||||
/**
|
||||
* We're not sure what went wrong. Try reconnecting?
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["UnknownError"] = 4000] = "UnknownError";
|
||||
/**
|
||||
* You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that!
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#payloads-and-opcodes
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["UnknownOpcode"] = 4001] = "UnknownOpcode";
|
||||
/**
|
||||
* You sent an invalid payload to us. Don't do that!
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#sending-payloads
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError";
|
||||
/**
|
||||
* You sent us a payload prior to identifying
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#identify
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated";
|
||||
/**
|
||||
* The account token sent with your identify payload is incorrect
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#identify
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed";
|
||||
/**
|
||||
* You sent more than one identify payload. Don't do that!
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated";
|
||||
/**
|
||||
* The sequence sent when resuming the session was invalid. Reconnect and start a new session
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#resume
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq";
|
||||
/**
|
||||
* Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["RateLimited"] = 4008] = "RateLimited";
|
||||
/**
|
||||
* Your session timed out. Reconnect and start a new one
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["SessionTimedOut"] = 4009] = "SessionTimedOut";
|
||||
/**
|
||||
* You sent us an invalid shard when identifying
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#sharding
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard";
|
||||
/**
|
||||
* The session would have handled too many guilds - you are required to shard your connection in order to connect
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#sharding
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["ShardingRequired"] = 4011] = "ShardingRequired";
|
||||
/**
|
||||
* You sent an invalid version for the gateway
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["InvalidAPIVersion"] = 4012] = "InvalidAPIVersion";
|
||||
/**
|
||||
* You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#gateway-intents
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["InvalidIntents"] = 4013] = "InvalidIntents";
|
||||
/**
|
||||
* You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not
|
||||
* enabled or are not whitelisted for
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#gateway-intents
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#privileged-intents
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents";
|
||||
})(GatewayCloseCodes = exports.GatewayCloseCodes || (exports.GatewayCloseCodes = {}));
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#list-of-intents
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
var GatewayIntentBits;
|
||||
(function (GatewayIntentBits) {
|
||||
GatewayIntentBits[GatewayIntentBits["Guilds"] = 1] = "Guilds";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildMembers"] = 2] = "GuildMembers";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildBans"] = 4] = "GuildBans";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildEmojisAndStickers"] = 8] = "GuildEmojisAndStickers";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildIntegrations"] = 16] = "GuildIntegrations";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildWebhooks"] = 32] = "GuildWebhooks";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildInvites"] = 64] = "GuildInvites";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildVoiceStates"] = 128] = "GuildVoiceStates";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildPresences"] = 256] = "GuildPresences";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildMessages"] = 512] = "GuildMessages";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildMessageReactions"] = 1024] = "GuildMessageReactions";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildMessageTyping"] = 2048] = "GuildMessageTyping";
|
||||
GatewayIntentBits[GatewayIntentBits["DirectMessages"] = 4096] = "DirectMessages";
|
||||
GatewayIntentBits[GatewayIntentBits["DirectMessageReactions"] = 8192] = "DirectMessageReactions";
|
||||
GatewayIntentBits[GatewayIntentBits["DirectMessageTyping"] = 16384] = "DirectMessageTyping";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildScheduledEvents"] = 65536] = "GuildScheduledEvents";
|
||||
})(GatewayIntentBits = exports.GatewayIntentBits || (exports.GatewayIntentBits = {}));
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
var GatewayDispatchEvents;
|
||||
(function (GatewayDispatchEvents) {
|
||||
GatewayDispatchEvents["ChannelCreate"] = "CHANNEL_CREATE";
|
||||
GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE";
|
||||
GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
|
||||
GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_UPDATE";
|
||||
GatewayDispatchEvents["GuildBanAdd"] = "GUILD_BAN_ADD";
|
||||
GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE";
|
||||
GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE";
|
||||
GatewayDispatchEvents["GuildDelete"] = "GUILD_DELETE";
|
||||
GatewayDispatchEvents["GuildEmojisUpdate"] = "GUILD_EMOJIS_UPDATE";
|
||||
GatewayDispatchEvents["GuildIntegrationsUpdate"] = "GUILD_INTEGRATIONS_UPDATE";
|
||||
GatewayDispatchEvents["GuildMemberAdd"] = "GUILD_MEMBER_ADD";
|
||||
GatewayDispatchEvents["GuildMemberRemove"] = "GUILD_MEMBER_REMOVE";
|
||||
GatewayDispatchEvents["GuildMembersChunk"] = "GUILD_MEMBERS_CHUNK";
|
||||
GatewayDispatchEvents["GuildMemberUpdate"] = "GUILD_MEMBER_UPDATE";
|
||||
GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE";
|
||||
GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE";
|
||||
GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE";
|
||||
GatewayDispatchEvents["GuildStickersUpdate"] = "GUILD_STICKERS_UPDATE";
|
||||
GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE";
|
||||
GatewayDispatchEvents["IntegrationCreate"] = "INTEGRATION_CREATE";
|
||||
GatewayDispatchEvents["IntegrationDelete"] = "INTEGRATION_DELETE";
|
||||
GatewayDispatchEvents["IntegrationUpdate"] = "INTEGRATION_UPDATE";
|
||||
GatewayDispatchEvents["InteractionCreate"] = "INTERACTION_CREATE";
|
||||
GatewayDispatchEvents["InviteCreate"] = "INVITE_CREATE";
|
||||
GatewayDispatchEvents["InviteDelete"] = "INVITE_DELETE";
|
||||
GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE";
|
||||
GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE";
|
||||
GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK";
|
||||
GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD";
|
||||
GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE";
|
||||
GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL";
|
||||
GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI";
|
||||
GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE";
|
||||
GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE";
|
||||
GatewayDispatchEvents["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE";
|
||||
GatewayDispatchEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE";
|
||||
GatewayDispatchEvents["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE";
|
||||
GatewayDispatchEvents["Ready"] = "READY";
|
||||
GatewayDispatchEvents["Resumed"] = "RESUMED";
|
||||
GatewayDispatchEvents["TypingStart"] = "TYPING_START";
|
||||
GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE";
|
||||
GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
|
||||
GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
|
||||
GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
|
||||
GatewayDispatchEvents["GuildScheduledEventCreate"] = "GUILD_SCHEDULED_EVENT_CREATE";
|
||||
GatewayDispatchEvents["GuildScheduledEventUpdate"] = "GUILD_SCHEDULED_EVENT_UPDATE";
|
||||
GatewayDispatchEvents["GuildScheduledEventDelete"] = "GUILD_SCHEDULED_EVENT_DELETE";
|
||||
GatewayDispatchEvents["GuildScheduledEventUserAdd"] = "GUILD_SCHEDULED_EVENT_USER_ADD";
|
||||
GatewayDispatchEvents["GuildScheduledEventUserRemove"] = "GUILD_SCHEDULED_EVENT_USER_REMOVE";
|
||||
})(GatewayDispatchEvents = exports.GatewayDispatchEvents || (exports.GatewayDispatchEvents = {}));
|
||||
// #endregion Shared
|
||||
//# sourceMappingURL=v8.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"v8.js","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;AA0BH,2CAAyB;AAEzB;;GAEG;AACU,QAAA,cAAc,GAAG,GAAG,CAAC;AAElC;;;GAGG;AACH,IAAY,cA8CX;AA9CD,WAAY,cAAc;IACzB;;OAEG;IACH,2DAAQ,CAAA;IACR;;;OAGG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,2DAAQ,CAAA;IACR;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,2EAAgB,CAAA;IAChB;;OAEG;IACH,uDAAU,CAAA;IACV;;OAEG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,iFAAmB,CAAA;IACnB;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,sDAAK,CAAA;IACL;;OAEG;IACH,oEAAY,CAAA;AACb,CAAC,EA9CW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QA8CzB;AAED;;;GAGG;AACH,IAAY,iBA8EX;AA9ED,WAAY,iBAAiB;IAC5B;;OAEG;IACH,4EAAmB,CAAA;IACnB;;;;OAIG;IACH,8EAAa,CAAA;IACb;;;;OAIG;IACH,0EAAW,CAAA;IACX;;;;OAIG;IACH,oFAAgB,CAAA;IAChB;;;;OAIG;IACH,4FAAoB,CAAA;IACpB;;OAEG;IACH,4FAAoB,CAAA;IACpB;;;;OAIG;IACH,wEAAiB,CAAA;IACjB;;OAEG;IACH,0EAAW,CAAA;IACX;;OAEG;IACH,kFAAe,CAAA;IACf;;;;OAIG;IACH,4EAAY,CAAA;IACZ;;;;OAIG;IACH,oFAAgB,CAAA;IAChB;;OAEG;IACH,sFAAiB,CAAA;IACjB;;;;OAIG;IACH,gFAAc,CAAA;IACd;;;;;;;OAOG;IACH,sFAAiB,CAAA;AAClB,CAAC,EA9EW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QA8E5B;AAED;;;GAGG;AACH,IAAY,iBAiBX;AAjBD,WAAY,iBAAiB;IAC5B,6DAAe,CAAA;IACf,yEAAqB,CAAA;IACrB,mEAAkB,CAAA;IAClB,6FAA+B,CAAA;IAC/B,oFAA0B,CAAA;IAC1B,4EAAsB,CAAA;IACtB,0EAAqB,CAAA;IACrB,mFAAyB,CAAA;IACzB,+EAAuB,CAAA;IACvB,6EAAsB,CAAA;IACtB,8FAA+B,CAAA;IAC/B,wFAA4B,CAAA;IAC5B,gFAAwB,CAAA;IACxB,gGAAgC,CAAA;IAChC,2FAA6B,CAAA;IAC7B,6FAA8B,CAAA;AAC/B,CAAC,EAjBW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAiB5B;AAED;;;GAGG;AACH,IAAY,qBAkDX;AAlDD,WAAY,qBAAqB;IAChC,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,kEAAyC,CAAA;IACzC,yDAAgC,CAAA;IAChC,sDAA6B,CAAA;IAC7B,4DAAmC,CAAA;IACnC,qDAA4B,CAAA;IAC5B,qDAA4B,CAAA;IAC5B,kEAAyC,CAAA;IACzC,8EAAqD,CAAA;IACrD,4DAAmC,CAAA;IACnC,kEAAyC,CAAA;IACzC,kEAAyC,CAAA;IACzC,kEAAyC,CAAA;IACzC,8DAAqC,CAAA;IACrC,8DAAqC,CAAA;IACrC,8DAAqC,CAAA;IACrC,sEAA6C,CAAA;IAC7C,qDAA4B,CAAA;IAC5B,iEAAwC,CAAA;IACxC,iEAAwC,CAAA;IACxC,iEAAwC,CAAA;IACxC,iEAAwC,CAAA;IACxC,uDAA8B,CAAA;IAC9B,uDAA8B,CAAA;IAC9B,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,kEAAyC,CAAA;IACzC,oEAA2C,CAAA;IAC3C,0EAAiD,CAAA;IACjD,iFAAwD,CAAA;IACxD,qFAA4D,CAAA;IAC5D,yDAAgC,CAAA;IAChC,2DAAkC,CAAA;IAClC,sEAA6C,CAAA;IAC7C,sEAA6C,CAAA;IAC7C,sEAA6C,CAAA;IAC7C,wCAAe,CAAA;IACf,4CAAmB,CAAA;IACnB,qDAA4B,CAAA;IAC5B,mDAA0B,CAAA;IAC1B,kEAAyC,CAAA;IACzC,gEAAuC,CAAA;IACvC,2DAAkC,CAAA;IAClC,mFAA0D,CAAA;IAC1D,mFAA0D,CAAA;IAC1D,mFAA0D,CAAA;IAC1D,sFAA6D,CAAA;IAC7D,4FAAmE,CAAA;AACpE,CAAC,EAlDW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAkDhC;AA4gDD,oBAAoB"}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
import mod from "./v8.js";
|
||||
|
||||
export default mod;
|
||||
export const GatewayCloseCodes = mod.GatewayCloseCodes;
|
||||
export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
|
||||
export const GatewayIntentBits = mod.GatewayIntentBits;
|
||||
export const GatewayOpcodes = mod.GatewayOpcodes;
|
||||
export const GatewayVersion = mod.GatewayVersion;
|
||||
+1470
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+1
File diff suppressed because one or more lines are too long
+242
@@ -0,0 +1,242 @@
|
||||
"use strict";
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/topics/gateway
|
||||
*/
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0;
|
||||
__exportStar(require("./common"), exports);
|
||||
exports.GatewayVersion = '9';
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
|
||||
*/
|
||||
var GatewayOpcodes;
|
||||
(function (GatewayOpcodes) {
|
||||
/**
|
||||
* An event was dispatched
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["Dispatch"] = 0] = "Dispatch";
|
||||
/**
|
||||
* A bidirectional opcode to maintain an active gateway connection.
|
||||
* Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client.
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["Heartbeat"] = 1] = "Heartbeat";
|
||||
/**
|
||||
* Starts a new session during the initial handshake
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["Identify"] = 2] = "Identify";
|
||||
/**
|
||||
* Update the client's presence
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["PresenceUpdate"] = 3] = "PresenceUpdate";
|
||||
/**
|
||||
* Used to join/leave or move between voice channels
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["VoiceStateUpdate"] = 4] = "VoiceStateUpdate";
|
||||
/**
|
||||
* Resume a previous session that was disconnected
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["Resume"] = 6] = "Resume";
|
||||
/**
|
||||
* You should attempt to reconnect and resume immediately
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["Reconnect"] = 7] = "Reconnect";
|
||||
/**
|
||||
* Request information about offline guild members in a large guild
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["RequestGuildMembers"] = 8] = "RequestGuildMembers";
|
||||
/**
|
||||
* The session has been invalidated. You should reconnect and identify/resume accordingly
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["InvalidSession"] = 9] = "InvalidSession";
|
||||
/**
|
||||
* Sent immediately after connecting, contains the `heartbeat_interval` to use
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["Hello"] = 10] = "Hello";
|
||||
/**
|
||||
* Sent in response to receiving a heartbeat to acknowledge that it has been received
|
||||
*/
|
||||
GatewayOpcodes[GatewayOpcodes["HeartbeatAck"] = 11] = "HeartbeatAck";
|
||||
})(GatewayOpcodes = exports.GatewayOpcodes || (exports.GatewayOpcodes = {}));
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
|
||||
*/
|
||||
var GatewayCloseCodes;
|
||||
(function (GatewayCloseCodes) {
|
||||
/**
|
||||
* We're not sure what went wrong. Try reconnecting?
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["UnknownError"] = 4000] = "UnknownError";
|
||||
/**
|
||||
* You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that!
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#payloads-and-opcodes
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["UnknownOpcode"] = 4001] = "UnknownOpcode";
|
||||
/**
|
||||
* You sent an invalid payload to us. Don't do that!
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#sending-payloads
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError";
|
||||
/**
|
||||
* You sent us a payload prior to identifying
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#identify
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated";
|
||||
/**
|
||||
* The account token sent with your identify payload is incorrect
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#identify
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed";
|
||||
/**
|
||||
* You sent more than one identify payload. Don't do that!
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated";
|
||||
/**
|
||||
* The sequence sent when resuming the session was invalid. Reconnect and start a new session
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#resume
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq";
|
||||
/**
|
||||
* Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["RateLimited"] = 4008] = "RateLimited";
|
||||
/**
|
||||
* Your session timed out. Reconnect and start a new one
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["SessionTimedOut"] = 4009] = "SessionTimedOut";
|
||||
/**
|
||||
* You sent us an invalid shard when identifying
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#sharding
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard";
|
||||
/**
|
||||
* The session would have handled too many guilds - you are required to shard your connection in order to connect
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#sharding
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["ShardingRequired"] = 4011] = "ShardingRequired";
|
||||
/**
|
||||
* You sent an invalid version for the gateway
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["InvalidAPIVersion"] = 4012] = "InvalidAPIVersion";
|
||||
/**
|
||||
* You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#gateway-intents
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["InvalidIntents"] = 4013] = "InvalidIntents";
|
||||
/**
|
||||
* You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not
|
||||
* enabled or are not whitelisted for
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#gateway-intents
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#privileged-intents
|
||||
*/
|
||||
GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents";
|
||||
})(GatewayCloseCodes = exports.GatewayCloseCodes || (exports.GatewayCloseCodes = {}));
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#list-of-intents
|
||||
*/
|
||||
var GatewayIntentBits;
|
||||
(function (GatewayIntentBits) {
|
||||
GatewayIntentBits[GatewayIntentBits["Guilds"] = 1] = "Guilds";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildMembers"] = 2] = "GuildMembers";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildBans"] = 4] = "GuildBans";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildEmojisAndStickers"] = 8] = "GuildEmojisAndStickers";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildIntegrations"] = 16] = "GuildIntegrations";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildWebhooks"] = 32] = "GuildWebhooks";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildInvites"] = 64] = "GuildInvites";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildVoiceStates"] = 128] = "GuildVoiceStates";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildPresences"] = 256] = "GuildPresences";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildMessages"] = 512] = "GuildMessages";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildMessageReactions"] = 1024] = "GuildMessageReactions";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildMessageTyping"] = 2048] = "GuildMessageTyping";
|
||||
GatewayIntentBits[GatewayIntentBits["DirectMessages"] = 4096] = "DirectMessages";
|
||||
GatewayIntentBits[GatewayIntentBits["DirectMessageReactions"] = 8192] = "DirectMessageReactions";
|
||||
GatewayIntentBits[GatewayIntentBits["DirectMessageTyping"] = 16384] = "DirectMessageTyping";
|
||||
GatewayIntentBits[GatewayIntentBits["GuildScheduledEvents"] = 65536] = "GuildScheduledEvents";
|
||||
})(GatewayIntentBits = exports.GatewayIntentBits || (exports.GatewayIntentBits = {}));
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events
|
||||
*/
|
||||
var GatewayDispatchEvents;
|
||||
(function (GatewayDispatchEvents) {
|
||||
GatewayDispatchEvents["ApplicationCommandPermissionsUpdate"] = "APPLICATION_COMMAND_PERMISSIONS_UPDATE";
|
||||
GatewayDispatchEvents["ChannelCreate"] = "CHANNEL_CREATE";
|
||||
GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE";
|
||||
GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
|
||||
GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_UPDATE";
|
||||
GatewayDispatchEvents["GuildBanAdd"] = "GUILD_BAN_ADD";
|
||||
GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE";
|
||||
GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE";
|
||||
GatewayDispatchEvents["GuildDelete"] = "GUILD_DELETE";
|
||||
GatewayDispatchEvents["GuildEmojisUpdate"] = "GUILD_EMOJIS_UPDATE";
|
||||
GatewayDispatchEvents["GuildIntegrationsUpdate"] = "GUILD_INTEGRATIONS_UPDATE";
|
||||
GatewayDispatchEvents["GuildMemberAdd"] = "GUILD_MEMBER_ADD";
|
||||
GatewayDispatchEvents["GuildMemberRemove"] = "GUILD_MEMBER_REMOVE";
|
||||
GatewayDispatchEvents["GuildMembersChunk"] = "GUILD_MEMBERS_CHUNK";
|
||||
GatewayDispatchEvents["GuildMemberUpdate"] = "GUILD_MEMBER_UPDATE";
|
||||
GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE";
|
||||
GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE";
|
||||
GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE";
|
||||
GatewayDispatchEvents["GuildStickersUpdate"] = "GUILD_STICKERS_UPDATE";
|
||||
GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE";
|
||||
GatewayDispatchEvents["IntegrationCreate"] = "INTEGRATION_CREATE";
|
||||
GatewayDispatchEvents["IntegrationDelete"] = "INTEGRATION_DELETE";
|
||||
GatewayDispatchEvents["IntegrationUpdate"] = "INTEGRATION_UPDATE";
|
||||
GatewayDispatchEvents["InteractionCreate"] = "INTERACTION_CREATE";
|
||||
GatewayDispatchEvents["InviteCreate"] = "INVITE_CREATE";
|
||||
GatewayDispatchEvents["InviteDelete"] = "INVITE_DELETE";
|
||||
GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE";
|
||||
GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE";
|
||||
GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK";
|
||||
GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD";
|
||||
GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE";
|
||||
GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL";
|
||||
GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI";
|
||||
GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE";
|
||||
GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE";
|
||||
GatewayDispatchEvents["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE";
|
||||
GatewayDispatchEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE";
|
||||
GatewayDispatchEvents["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE";
|
||||
GatewayDispatchEvents["Ready"] = "READY";
|
||||
GatewayDispatchEvents["Resumed"] = "RESUMED";
|
||||
GatewayDispatchEvents["ThreadCreate"] = "THREAD_CREATE";
|
||||
GatewayDispatchEvents["ThreadDelete"] = "THREAD_DELETE";
|
||||
GatewayDispatchEvents["ThreadListSync"] = "THREAD_LIST_SYNC";
|
||||
GatewayDispatchEvents["ThreadMembersUpdate"] = "THREAD_MEMBERS_UPDATE";
|
||||
GatewayDispatchEvents["ThreadMemberUpdate"] = "THREAD_MEMBER_UPDATE";
|
||||
GatewayDispatchEvents["ThreadUpdate"] = "THREAD_UPDATE";
|
||||
GatewayDispatchEvents["TypingStart"] = "TYPING_START";
|
||||
GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE";
|
||||
GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
|
||||
GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
|
||||
GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
|
||||
GatewayDispatchEvents["GuildScheduledEventCreate"] = "GUILD_SCHEDULED_EVENT_CREATE";
|
||||
GatewayDispatchEvents["GuildScheduledEventUpdate"] = "GUILD_SCHEDULED_EVENT_UPDATE";
|
||||
GatewayDispatchEvents["GuildScheduledEventDelete"] = "GUILD_SCHEDULED_EVENT_DELETE";
|
||||
GatewayDispatchEvents["GuildScheduledEventUserAdd"] = "GUILD_SCHEDULED_EVENT_USER_ADD";
|
||||
GatewayDispatchEvents["GuildScheduledEventUserRemove"] = "GUILD_SCHEDULED_EVENT_USER_REMOVE";
|
||||
})(GatewayDispatchEvents = exports.GatewayDispatchEvents || (exports.GatewayDispatchEvents = {}));
|
||||
// #endregion Shared
|
||||
//# sourceMappingURL=v9.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"v9.js","sourceRoot":"","sources":["v9.ts"],"names":[],"mappings":"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"}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
import mod from "./v9.js";
|
||||
|
||||
export default mod;
|
||||
export const GatewayCloseCodes = mod.GatewayCloseCodes;
|
||||
export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
|
||||
export const GatewayIntentBits = mod.GatewayIntentBits;
|
||||
export const GatewayOpcodes = mod.GatewayOpcodes;
|
||||
export const GatewayVersion = mod.GatewayVersion;
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* https://discord.com/developers/docs/reference#snowflakes
|
||||
*/
|
||||
export declare type Snowflake = string;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/permissions
|
||||
* @internal
|
||||
*/
|
||||
export declare type Permissions = string;
|
||||
/**
|
||||
* https://discord.com/developers/docs/reference#message-formatting-formats
|
||||
*/
|
||||
export declare const FormattingPatterns: {
|
||||
/**
|
||||
* Regular expression for matching a user mention, strictly without a nickname
|
||||
*
|
||||
* The `id` group property is present on the `exec` result of this expression
|
||||
*/
|
||||
readonly User: RegExp;
|
||||
/**
|
||||
* Regular expression for matching a user mention, strictly with a nickname
|
||||
*
|
||||
* The `id` group property is present on the `exec` result of this expression
|
||||
* @deprecated Passing `!` in user mentions is no longer necessary / supported, and future message contents won't have it
|
||||
*/
|
||||
readonly UserWithNickname: RegExp;
|
||||
/**
|
||||
* Regular expression for matching a user mention, with or without a nickname
|
||||
*
|
||||
* The `id` group property is present on the `exec` result of this expression
|
||||
* @deprecated Passing `!` in user mentions is no longer necessary / supported, and future message contents won't have it
|
||||
*/
|
||||
readonly UserWithOptionalNickname: RegExp;
|
||||
/**
|
||||
* Regular expression for matching a channel mention
|
||||
*
|
||||
* The `id` group property is present on the `exec` result of this expression
|
||||
*/
|
||||
readonly Channel: RegExp;
|
||||
/**
|
||||
* Regular expression for matching a role mention
|
||||
*
|
||||
* The `id` group property is present on the `exec` result of this expression
|
||||
*/
|
||||
readonly Role: RegExp;
|
||||
/**
|
||||
* Regular expression for matching a custom emoji, either static or animated
|
||||
*
|
||||
* The `animated`, `name` and `id` group properties are present on the `exec` result of this expression
|
||||
*/
|
||||
readonly Emoji: RegExp;
|
||||
/**
|
||||
* Regular expression for matching strictly an animated custom emoji
|
||||
*
|
||||
* The `animated`, `name` and `id` group properties are present on the `exec` result of this expression
|
||||
*/
|
||||
readonly AnimatedEmoji: RegExp;
|
||||
/**
|
||||
* Regular expression for matching strictly a static custom emoji
|
||||
*
|
||||
* The `name` and `id` group properties are present on the `exec` result of this expression
|
||||
*/
|
||||
readonly StaticEmoji: RegExp;
|
||||
/**
|
||||
* Regular expression for matching a timestamp, either default or custom styled
|
||||
*
|
||||
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
|
||||
*/
|
||||
readonly Timestamp: RegExp;
|
||||
/**
|
||||
* Regular expression for matching strictly default styled timestamps
|
||||
*
|
||||
* The `timestamp` group property is present on the `exec` result of this expression
|
||||
*/
|
||||
readonly DefaultStyledTimestamp: RegExp;
|
||||
/**
|
||||
* Regular expression for matching strictly custom styled timestamps
|
||||
*
|
||||
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
|
||||
*/
|
||||
readonly StyledTimestamp: RegExp;
|
||||
};
|
||||
//# sourceMappingURL=globals.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["globals.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,SAAS,GAAG,MAAM,CAAC;AAE/B;;;GAGG;AACH,oBAAY,WAAW,GAAG,MAAM,CAAC;AAEjC;;GAEG;AACH,eAAO,MAAM,kBAAkB;IAC9B;;;;OAIG;;IAEH;;;;;OAKG;;IAEH;;;;;OAKG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;CAEM,CAAC"}
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.FormattingPatterns = void 0;
|
||||
/**
|
||||
* https://discord.com/developers/docs/reference#message-formatting-formats
|
||||
*/
|
||||
exports.FormattingPatterns = {
|
||||
/**
|
||||
* Regular expression for matching a user mention, strictly without a nickname
|
||||
*
|
||||
* The `id` group property is present on the `exec` result of this expression
|
||||
*/
|
||||
User: /<@(?<id>\d{17,20})>/,
|
||||
/**
|
||||
* Regular expression for matching a user mention, strictly with a nickname
|
||||
*
|
||||
* The `id` group property is present on the `exec` result of this expression
|
||||
* @deprecated Passing `!` in user mentions is no longer necessary / supported, and future message contents won't have it
|
||||
*/
|
||||
UserWithNickname: /<@!(?<id>\d{17,20})>/,
|
||||
/**
|
||||
* Regular expression for matching a user mention, with or without a nickname
|
||||
*
|
||||
* The `id` group property is present on the `exec` result of this expression
|
||||
* @deprecated Passing `!` in user mentions is no longer necessary / supported, and future message contents won't have it
|
||||
*/
|
||||
UserWithOptionalNickname: /<@!?(?<id>\d{17,20})>/,
|
||||
/**
|
||||
* Regular expression for matching a channel mention
|
||||
*
|
||||
* The `id` group property is present on the `exec` result of this expression
|
||||
*/
|
||||
Channel: /<#(?<id>\d{17,20})>/,
|
||||
/**
|
||||
* Regular expression for matching a role mention
|
||||
*
|
||||
* The `id` group property is present on the `exec` result of this expression
|
||||
*/
|
||||
Role: /<@&(?<id>\d{17,20})>/,
|
||||
/**
|
||||
* Regular expression for matching a custom emoji, either static or animated
|
||||
*
|
||||
* The `animated`, `name` and `id` group properties are present on the `exec` result of this expression
|
||||
*/
|
||||
Emoji: /<(?<animated>a)?:(?<name>\w{2,32}):(?<id>\d{17,20})>/,
|
||||
/**
|
||||
* Regular expression for matching strictly an animated custom emoji
|
||||
*
|
||||
* The `animated`, `name` and `id` group properties are present on the `exec` result of this expression
|
||||
*/
|
||||
AnimatedEmoji: /<(?<animated>a):(?<name>\w{2,32}):(?<id>\d{17,20})>/,
|
||||
/**
|
||||
* Regular expression for matching strictly a static custom emoji
|
||||
*
|
||||
* The `name` and `id` group properties are present on the `exec` result of this expression
|
||||
*/
|
||||
StaticEmoji: /<:(?<name>\w{2,32}):(?<id>\d{17,20})>/,
|
||||
/**
|
||||
* Regular expression for matching a timestamp, either default or custom styled
|
||||
*
|
||||
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
|
||||
*/
|
||||
Timestamp: /<t:(?<timestamp>-?\d{1,13})(:(?<style>[tTdDfFR]))?>/,
|
||||
/**
|
||||
* Regular expression for matching strictly default styled timestamps
|
||||
*
|
||||
* The `timestamp` group property is present on the `exec` result of this expression
|
||||
*/
|
||||
DefaultStyledTimestamp: /<t:(?<timestamp>-?\d{1,13})>/,
|
||||
/**
|
||||
* Regular expression for matching strictly custom styled timestamps
|
||||
*
|
||||
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
|
||||
*/
|
||||
StyledTimestamp: /<t:(?<timestamp>-?\d{1,13}):(?<style>[tTdDfFR])>/,
|
||||
};
|
||||
/**
|
||||
* Freezes the formatting patterns
|
||||
* @internal
|
||||
*/
|
||||
Object.freeze(exports.FormattingPatterns);
|
||||
//# sourceMappingURL=globals.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"globals.js","sourceRoot":"","sources":["globals.ts"],"names":[],"mappings":";;;AAWA;;GAEG;AACU,QAAA,kBAAkB,GAAG;IACjC;;;;OAIG;IACH,IAAI,EAAE,qBAAqB;IAC3B;;;;;OAKG;IACH,gBAAgB,EAAE,sBAAsB;IACxC;;;;;OAKG;IACH,wBAAwB,EAAE,uBAAuB;IACjD;;;;OAIG;IACH,OAAO,EAAE,qBAAqB;IAC9B;;;;OAIG;IACH,IAAI,EAAE,sBAAsB;IAC5B;;;;OAIG;IACH,KAAK,EAAE,sDAAsD;IAC7D;;;;OAIG;IACH,aAAa,EAAE,qDAAqD;IACpE;;;;OAIG;IACH,WAAW,EAAE,uCAAuC;IACpD;;;;OAIG;IACH,SAAS,EAAE,qDAAqD;IAChE;;;;OAIG;IACH,sBAAsB,EAAE,8BAA8B;IACtD;;;;OAIG;IACH,eAAe,EAAE,kDAAkD;CAC1D,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,CAAC,0BAAkB,CAAC,CAAC"}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
import mod from "./globals.js";
|
||||
|
||||
export default mod;
|
||||
export const FormattingPatterns = mod.FormattingPatterns;
|
||||
+206
@@ -0,0 +1,206 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.36.3",
|
||||
"description": "Discord API typings that are kept up to date for use in bot library creation.",
|
||||
"homepage": "https://discord-api-types.dev",
|
||||
"exports": {
|
||||
"./globals": {
|
||||
"require": "./globals.js",
|
||||
"import": "./globals.mjs",
|
||||
"types": "./globals.d.ts"
|
||||
},
|
||||
"./v6": {
|
||||
"require": "./v6.js",
|
||||
"import": "./v6.mjs",
|
||||
"types": "./v6.d.ts"
|
||||
},
|
||||
"./v8": {
|
||||
"require": "./v8.js",
|
||||
"import": "./v8.mjs",
|
||||
"types": "./v8.d.ts"
|
||||
},
|
||||
"./v9": {
|
||||
"require": "./v9.js",
|
||||
"import": "./v9.mjs",
|
||||
"types": "./v9.d.ts"
|
||||
},
|
||||
"./v10": {
|
||||
"require": "./v10.js",
|
||||
"import": "./v10.mjs",
|
||||
"types": "./v10.d.ts"
|
||||
},
|
||||
"./gateway": {
|
||||
"require": "./gateway/index.js",
|
||||
"import": "./gateway/index.mjs",
|
||||
"types": "./gateway/index.d.ts"
|
||||
},
|
||||
"./gateway/v*": {
|
||||
"require": "./gateway/v*.js",
|
||||
"import": "./gateway/v*.mjs",
|
||||
"types": "./gateway/v*.d.ts"
|
||||
},
|
||||
"./payloads": {
|
||||
"require": "./payloads/index.js",
|
||||
"import": "./payloads/index.mjs",
|
||||
"types": "./payloads/index.d.ts"
|
||||
},
|
||||
"./payloads/v*": {
|
||||
"require": "./payloads/v*/index.js",
|
||||
"import": "./payloads/v*/index.mjs",
|
||||
"types": "./payloads/v*/index.d.ts"
|
||||
},
|
||||
"./rest": {
|
||||
"require": "./rest/index.js",
|
||||
"import": "./rest/index.mjs",
|
||||
"types": "./rest/index.d.ts"
|
||||
},
|
||||
"./rest/v*": {
|
||||
"require": "./rest/v*/index.js",
|
||||
"import": "./rest/v*/index.mjs",
|
||||
"types": "./rest/v*/index.d.ts"
|
||||
},
|
||||
"./rpc": {
|
||||
"require": "./rpc/index.js",
|
||||
"import": "./rpc/index.mjs",
|
||||
"types": "./rpc/index.d.ts"
|
||||
},
|
||||
"./rpc/v*": {
|
||||
"require": "./rpc/v*.js",
|
||||
"import": "./rpc/v*.mjs",
|
||||
"types": "./rpc/v*.d.ts"
|
||||
},
|
||||
"./voice": {
|
||||
"require": "./voice/index.js",
|
||||
"import": "./voice/index.mjs",
|
||||
"types": "./voice/index.d.ts"
|
||||
},
|
||||
"./voice/v*": {
|
||||
"require": "./voice/v*.js",
|
||||
"import": "./voice/v*.mjs",
|
||||
"types": "./voice/v*.d.ts"
|
||||
},
|
||||
"./utils": {
|
||||
"require": "./utils/index.js",
|
||||
"import": "./utils/index.mjs",
|
||||
"types": "./utils/index.d.ts"
|
||||
},
|
||||
"./utils/v*": {
|
||||
"require": "./utils/v*.js",
|
||||
"import": "./utils/v*.mjs",
|
||||
"types": "./utils/v*.d.ts"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"build:ci": "tsc --noEmit --incremental false",
|
||||
"build:deno": "node ./scripts/deno.mjs",
|
||||
"build:node": "tsc && run-p esm:*",
|
||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
|
||||
"ci:pr": "run-s changelog lint build:deno && node ./scripts/bump-website-version.mjs",
|
||||
"clean:deno": "rimraf deno/",
|
||||
"clean:node": "rimraf {gateway,payloads,rest,rpc,voice,utils}/**/*.{js,mjs,d.ts,*map} {globals,v*}.{js,mjs,d.ts,*map}",
|
||||
"clean": "run-p clean:*",
|
||||
"esm:gateway": "gen-esm-wrapper ./gateway/index.js ./gateway/index.mjs",
|
||||
"esm:globals": "gen-esm-wrapper ./globals.js ./globals.mjs",
|
||||
"esm:payloads": "gen-esm-wrapper ./payloads/index.js ./payloads/index.mjs",
|
||||
"esm:rest": "gen-esm-wrapper ./rest/index.js ./rest/index.mjs",
|
||||
"esm:rpc": "gen-esm-wrapper ./rpc/index.js ./rpc/index.mjs",
|
||||
"esm:utils": "gen-esm-wrapper ./utils/index.js ./utils/index.mjs",
|
||||
"esm:versions": "node ./scripts/versions.mjs",
|
||||
"esm:voice": "gen-esm-wrapper ./voice/index.js ./voice/index.mjs",
|
||||
"lint": "prettier --write . && eslint --fix --ext mjs,ts {gateway,payloads,rest,rpc,voice,utils}/**/*.ts {globals,v*}.ts scripts/**/*.mjs",
|
||||
"postpublish": "run-s clean:node build:deno",
|
||||
"prepare": "is-ci || husky install",
|
||||
"prepublishOnly": "run-s clean test:lint build:node",
|
||||
"test:lint": "prettier --check . && eslint --ext mjs,ts {gateway,payloads,rest,rpc,voice,utils}/**/*.ts {globals,v*}.ts scripts/**/*.mjs",
|
||||
"pretest:types": "tsc",
|
||||
"test:types": "node ./scripts/run-tsd.mjs",
|
||||
"posttest:types": "npm run clean:node"
|
||||
},
|
||||
"keywords": [
|
||||
"discord",
|
||||
"discord api",
|
||||
"types",
|
||||
"discordjs"
|
||||
],
|
||||
"author": "Vlad Frangu <kingdgrizzle@gmail.com>",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"{gateway,payloads,rest,rpc,voice,utils}/**/*.{js,js.map,d.ts,d.ts.map,mjs}",
|
||||
"{globals,v*}.{js,js.map,d.ts,d.ts.map,mjs}"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@babel/runtime-corejs3": "^7.18.0",
|
||||
"@commitlint/cli": "^17.0.0",
|
||||
"@commitlint/config-angular": "^17.0.0",
|
||||
"@favware/npm-deprecate": "^1.0.4",
|
||||
"@octokit/action": "^3.18.1",
|
||||
"@octokit/webhooks-types": "^5.6.0",
|
||||
"@sapphire/prettier-config": "^1.4.3",
|
||||
"@types/conventional-recommended-bump": "^6.1.0",
|
||||
"@types/node": "^17.0.35",
|
||||
"@typescript-eslint/eslint-plugin": "^5.26.0",
|
||||
"@typescript-eslint/parser": "^5.26.0",
|
||||
"conventional-changelog-cli": "^2.2.2",
|
||||
"conventional-recommended-bump": "^6.1.0",
|
||||
"eslint": "^8.16.0",
|
||||
"eslint-config-marine": "^9.4.1",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-import-resolver-typescript": "^2.7.1",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.5.1",
|
||||
"eslint-plugin-react": "^7.30.0",
|
||||
"eslint-plugin-react-hooks": "^4.5.0",
|
||||
"gen-esm-wrapper": "^1.1.3",
|
||||
"husky": "^8.0.1",
|
||||
"is-ci": "^3.0.1",
|
||||
"lint-staged": "^12.4.1",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^2.6.2",
|
||||
"pretty-quick": "^3.1.3",
|
||||
"rimraf": "^3.0.2",
|
||||
"tsd": "^0.20.0",
|
||||
"typescript": "^4.6.4"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/discordjs/discord-api-types"
|
||||
},
|
||||
"lint-staged": {
|
||||
"{gateway,payloads,rest,rpc,voice,utils}/**/*.{mjs,js,ts}": "eslint --fix --ext mjs,js,ts",
|
||||
"{globals,v*}.ts": "eslint --fix --ext mjs,js,ts"
|
||||
},
|
||||
"commitlint": {
|
||||
"extends": [
|
||||
"@commitlint/config-angular"
|
||||
],
|
||||
"rules": {
|
||||
"type-enum": [
|
||||
2,
|
||||
"always",
|
||||
[
|
||||
"chore",
|
||||
"build",
|
||||
"ci",
|
||||
"docs",
|
||||
"feat",
|
||||
"fix",
|
||||
"perf",
|
||||
"refactor",
|
||||
"revert",
|
||||
"style",
|
||||
"test",
|
||||
"types",
|
||||
"wip"
|
||||
]
|
||||
],
|
||||
"scope-case": [
|
||||
1,
|
||||
"always",
|
||||
"pascal-case"
|
||||
]
|
||||
}
|
||||
},
|
||||
"tsd": {
|
||||
"directory": "tests"
|
||||
}
|
||||
}
|
||||
Generated
Vendored
+53
@@ -0,0 +1,53 @@
|
||||
import type { LocaleString } from '../rest/common';
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
|
||||
*
|
||||
* These flags are exported as `BigInt`s and NOT numbers. Wrapping them in `Number()`
|
||||
* may cause issues, try to use BigInts as much as possible or modules that can
|
||||
* replicate them in some way
|
||||
*/
|
||||
export declare const PermissionFlagsBits: {
|
||||
readonly CreateInstantInvite: bigint;
|
||||
readonly KickMembers: bigint;
|
||||
readonly BanMembers: bigint;
|
||||
readonly Administrator: bigint;
|
||||
readonly ManageChannels: bigint;
|
||||
readonly ManageGuild: bigint;
|
||||
readonly AddReactions: bigint;
|
||||
readonly ViewAuditLog: bigint;
|
||||
readonly PrioritySpeaker: bigint;
|
||||
readonly Stream: bigint;
|
||||
readonly ViewChannel: bigint;
|
||||
readonly SendMessages: bigint;
|
||||
readonly SendTTSMessages: bigint;
|
||||
readonly ManageMessages: bigint;
|
||||
readonly EmbedLinks: bigint;
|
||||
readonly AttachFiles: bigint;
|
||||
readonly ReadMessageHistory: bigint;
|
||||
readonly MentionEveryone: bigint;
|
||||
readonly UseExternalEmojis: bigint;
|
||||
readonly ViewGuildInsights: bigint;
|
||||
readonly Connect: bigint;
|
||||
readonly Speak: bigint;
|
||||
readonly MuteMembers: bigint;
|
||||
readonly DeafenMembers: bigint;
|
||||
readonly MoveMembers: bigint;
|
||||
readonly UseVAD: bigint;
|
||||
readonly ChangeNickname: bigint;
|
||||
readonly ManageNicknames: bigint;
|
||||
readonly ManageRoles: bigint;
|
||||
readonly ManageWebhooks: bigint;
|
||||
readonly ManageEmojisAndStickers: bigint;
|
||||
readonly UseApplicationCommands: bigint;
|
||||
readonly RequestToSpeak: bigint;
|
||||
readonly ManageEvents: bigint;
|
||||
readonly ManageThreads: bigint;
|
||||
readonly CreatePublicThreads: bigint;
|
||||
readonly CreatePrivateThreads: bigint;
|
||||
readonly UseExternalStickers: bigint;
|
||||
readonly SendMessagesInThreads: bigint;
|
||||
readonly UseEmbeddedActivities: bigint;
|
||||
readonly ModerateMembers: bigint;
|
||||
};
|
||||
export declare type LocalizationMap = Partial<Record<LocaleString, string | null>>;
|
||||
//# sourceMappingURL=common.d.ts.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CtB,CAAC;AAQX,oBAAY,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC"}
|
||||
Generated
Vendored
+59
@@ -0,0 +1,59 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.PermissionFlagsBits = void 0;
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
|
||||
*
|
||||
* These flags are exported as `BigInt`s and NOT numbers. Wrapping them in `Number()`
|
||||
* may cause issues, try to use BigInts as much as possible or modules that can
|
||||
* replicate them in some way
|
||||
*/
|
||||
exports.PermissionFlagsBits = {
|
||||
CreateInstantInvite: 1n << 0n,
|
||||
KickMembers: 1n << 1n,
|
||||
BanMembers: 1n << 2n,
|
||||
Administrator: 1n << 3n,
|
||||
ManageChannels: 1n << 4n,
|
||||
ManageGuild: 1n << 5n,
|
||||
AddReactions: 1n << 6n,
|
||||
ViewAuditLog: 1n << 7n,
|
||||
PrioritySpeaker: 1n << 8n,
|
||||
Stream: 1n << 9n,
|
||||
ViewChannel: 1n << 10n,
|
||||
SendMessages: 1n << 11n,
|
||||
SendTTSMessages: 1n << 12n,
|
||||
ManageMessages: 1n << 13n,
|
||||
EmbedLinks: 1n << 14n,
|
||||
AttachFiles: 1n << 15n,
|
||||
ReadMessageHistory: 1n << 16n,
|
||||
MentionEveryone: 1n << 17n,
|
||||
UseExternalEmojis: 1n << 18n,
|
||||
ViewGuildInsights: 1n << 19n,
|
||||
Connect: 1n << 20n,
|
||||
Speak: 1n << 21n,
|
||||
MuteMembers: 1n << 22n,
|
||||
DeafenMembers: 1n << 23n,
|
||||
MoveMembers: 1n << 24n,
|
||||
UseVAD: 1n << 25n,
|
||||
ChangeNickname: 1n << 26n,
|
||||
ManageNicknames: 1n << 27n,
|
||||
ManageRoles: 1n << 28n,
|
||||
ManageWebhooks: 1n << 29n,
|
||||
ManageEmojisAndStickers: 1n << 30n,
|
||||
UseApplicationCommands: 1n << 31n,
|
||||
RequestToSpeak: 1n << 32n,
|
||||
ManageEvents: 1n << 33n,
|
||||
ManageThreads: 1n << 34n,
|
||||
CreatePublicThreads: 1n << 35n,
|
||||
CreatePrivateThreads: 1n << 36n,
|
||||
UseExternalStickers: 1n << 37n,
|
||||
SendMessagesInThreads: 1n << 38n,
|
||||
UseEmbeddedActivities: 1n << 39n,
|
||||
ModerateMembers: 1n << 40n,
|
||||
};
|
||||
/**
|
||||
* Freeze the object of bits, preventing any modifications to it
|
||||
* @internal
|
||||
*/
|
||||
Object.freeze(exports.PermissionFlagsBits);
|
||||
//# sourceMappingURL=common.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"common.js","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":";;;AAEA;;;;;;GAMG;AACU,QAAA,mBAAmB,GAAG;IAClC,mBAAmB,EAAE,EAAE,IAAI,EAAE;IAC7B,WAAW,EAAE,EAAE,IAAI,EAAE;IACrB,UAAU,EAAE,EAAE,IAAI,EAAE;IACpB,aAAa,EAAE,EAAE,IAAI,EAAE;IACvB,cAAc,EAAE,EAAE,IAAI,EAAE;IACxB,WAAW,EAAE,EAAE,IAAI,EAAE;IACrB,YAAY,EAAE,EAAE,IAAI,EAAE;IACtB,YAAY,EAAE,EAAE,IAAI,EAAE;IACtB,eAAe,EAAE,EAAE,IAAI,EAAE;IACzB,MAAM,EAAE,EAAE,IAAI,EAAE;IAChB,WAAW,EAAE,EAAE,IAAI,GAAG;IACtB,YAAY,EAAE,EAAE,IAAI,GAAG;IACvB,eAAe,EAAE,EAAE,IAAI,GAAG;IAC1B,cAAc,EAAE,EAAE,IAAI,GAAG;IACzB,UAAU,EAAE,EAAE,IAAI,GAAG;IACrB,WAAW,EAAE,EAAE,IAAI,GAAG;IACtB,kBAAkB,EAAE,EAAE,IAAI,GAAG;IAC7B,eAAe,EAAE,EAAE,IAAI,GAAG;IAC1B,iBAAiB,EAAE,EAAE,IAAI,GAAG;IAC5B,iBAAiB,EAAE,EAAE,IAAI,GAAG;IAC5B,OAAO,EAAE,EAAE,IAAI,GAAG;IAClB,KAAK,EAAE,EAAE,IAAI,GAAG;IAChB,WAAW,EAAE,EAAE,IAAI,GAAG;IACtB,aAAa,EAAE,EAAE,IAAI,GAAG;IACxB,WAAW,EAAE,EAAE,IAAI,GAAG;IACtB,MAAM,EAAE,EAAE,IAAI,GAAG;IACjB,cAAc,EAAE,EAAE,IAAI,GAAG;IACzB,eAAe,EAAE,EAAE,IAAI,GAAG;IAC1B,WAAW,EAAE,EAAE,IAAI,GAAG;IACtB,cAAc,EAAE,EAAE,IAAI,GAAG;IACzB,uBAAuB,EAAE,EAAE,IAAI,GAAG;IAClC,sBAAsB,EAAE,EAAE,IAAI,GAAG;IACjC,cAAc,EAAE,EAAE,IAAI,GAAG;IACzB,YAAY,EAAE,EAAE,IAAI,GAAG;IACvB,aAAa,EAAE,EAAE,IAAI,GAAG;IACxB,mBAAmB,EAAE,EAAE,IAAI,GAAG;IAC9B,oBAAoB,EAAE,EAAE,IAAI,GAAG;IAC/B,mBAAmB,EAAE,EAAE,IAAI,GAAG;IAC9B,qBAAqB,EAAE,EAAE,IAAI,GAAG;IAChC,qBAAqB,EAAE,EAAE,IAAI,GAAG;IAChC,eAAe,EAAE,EAAE,IAAI,GAAG;CACjB,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,CAAC,2BAAmB,CAAC,CAAC"}
|
||||
Generated
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
export * from './v10/index';
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,cAAc,aAAa,CAAC"}
|
||||
Generated
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
// This file exports all the payloads available in the recommended API version
|
||||
// Thereby, things MAY break in the future. Try sticking to imports from a specific version
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__exportStar(require("./v10/index"), exports);
|
||||
//# sourceMappingURL=index.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,2FAA2F;;;;;;;;;;;;;;;;AAE3F,8CAA4B"}
|
||||
Generated
Vendored
+57
@@ -0,0 +1,57 @@
|
||||
import mod from "./index.js";
|
||||
|
||||
export default mod;
|
||||
export const APIApplicationCommandPermissionsConstant = mod.APIApplicationCommandPermissionsConstant;
|
||||
export const ActivityFlags = mod.ActivityFlags;
|
||||
export const ActivityPlatform = mod.ActivityPlatform;
|
||||
export const ActivityType = mod.ActivityType;
|
||||
export const AllowedMentionsTypes = mod.AllowedMentionsTypes;
|
||||
export const ApplicationCommandOptionType = mod.ApplicationCommandOptionType;
|
||||
export const ApplicationCommandPermissionType = mod.ApplicationCommandPermissionType;
|
||||
export const ApplicationCommandType = mod.ApplicationCommandType;
|
||||
export const ApplicationFlags = mod.ApplicationFlags;
|
||||
export const AuditLogEvent = mod.AuditLogEvent;
|
||||
export const AuditLogOptionsType = mod.AuditLogOptionsType;
|
||||
export const ButtonStyle = mod.ButtonStyle;
|
||||
export const ChannelFlags = mod.ChannelFlags;
|
||||
export const ChannelType = mod.ChannelType;
|
||||
export const ComponentType = mod.ComponentType;
|
||||
export const ConnectionService = mod.ConnectionService;
|
||||
export const ConnectionVisibility = mod.ConnectionVisibility;
|
||||
export const EmbedType = mod.EmbedType;
|
||||
export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications;
|
||||
export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter;
|
||||
export const GuildFeature = mod.GuildFeature;
|
||||
export const GuildHubType = mod.GuildHubType;
|
||||
export const GuildMFALevel = mod.GuildMFALevel;
|
||||
export const GuildNSFWLevel = mod.GuildNSFWLevel;
|
||||
export const GuildPremiumTier = mod.GuildPremiumTier;
|
||||
export const GuildScheduledEventEntityType = mod.GuildScheduledEventEntityType;
|
||||
export const GuildScheduledEventPrivacyLevel = mod.GuildScheduledEventPrivacyLevel;
|
||||
export const GuildScheduledEventStatus = mod.GuildScheduledEventStatus;
|
||||
export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags;
|
||||
export const GuildVerificationLevel = mod.GuildVerificationLevel;
|
||||
export const GuildWidgetStyle = mod.GuildWidgetStyle;
|
||||
export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior;
|
||||
export const InteractionResponseType = mod.InteractionResponseType;
|
||||
export const InteractionType = mod.InteractionType;
|
||||
export const InviteTargetType = mod.InviteTargetType;
|
||||
export const MembershipScreeningFieldType = mod.MembershipScreeningFieldType;
|
||||
export const MessageActivityType = mod.MessageActivityType;
|
||||
export const MessageFlags = mod.MessageFlags;
|
||||
export const MessageType = mod.MessageType;
|
||||
export const OAuth2Scopes = mod.OAuth2Scopes;
|
||||
export const OverwriteType = mod.OverwriteType;
|
||||
export const PermissionFlagsBits = mod.PermissionFlagsBits;
|
||||
export const PresenceUpdateStatus = mod.PresenceUpdateStatus;
|
||||
export const StageInstancePrivacyLevel = mod.StageInstancePrivacyLevel;
|
||||
export const StickerFormatType = mod.StickerFormatType;
|
||||
export const StickerType = mod.StickerType;
|
||||
export const TeamMemberMembershipState = mod.TeamMemberMembershipState;
|
||||
export const TextInputStyle = mod.TextInputStyle;
|
||||
export const ThreadAutoArchiveDuration = mod.ThreadAutoArchiveDuration;
|
||||
export const ThreadMemberFlags = mod.ThreadMemberFlags;
|
||||
export const UserFlags = mod.UserFlags;
|
||||
export const UserPremiumType = mod.UserPremiumType;
|
||||
export const VideoQualityMode = mod.VideoQualityMode;
|
||||
export const WebhookType = mod.WebhookType;
|
||||
Generated
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
|
||||
import type { ApplicationCommandOptionType } from './shared';
|
||||
import type { Snowflake } from '../../../../../globals';
|
||||
export declare type APIApplicationCommandAttachmentOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Attachment>;
|
||||
export declare type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Attachment, Snowflake>;
|
||||
//# sourceMappingURL=attachment.d.ts.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["attachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,oBAAY,qCAAqC,GAChD,+BAA+B,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;AAE1E,oBAAY,oDAAoD,GAAG,4BAA4B,CAC9F,4BAA4B,CAAC,UAAU,EACvC,SAAS,CACT,CAAC"}
|
||||
Generated
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=attachment.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"attachment.js","sourceRoot":"","sources":["attachment.ts"],"names":[],"mappings":""}
|
||||
Generated
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
|
||||
import type { LocalizationMap } from '../../../../../v10';
|
||||
export interface APIApplicationCommandOptionBase<Type extends ApplicationCommandOptionType> {
|
||||
type: Type;
|
||||
name: string;
|
||||
name_localizations?: LocalizationMap | null;
|
||||
description: string;
|
||||
description_localizations?: LocalizationMap | null;
|
||||
required?: boolean;
|
||||
}
|
||||
export interface APIInteractionDataOptionBase<T extends ApplicationCommandOptionType, D> {
|
||||
name: string;
|
||||
type: T;
|
||||
value: D;
|
||||
}
|
||||
export declare type APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<Base extends APIApplicationCommandOptionBase<ApplicationCommandOptionType>, ChoiceType extends APIApplicationCommandOptionChoice> = (Base & {
|
||||
autocomplete: true;
|
||||
}) | (Base & {
|
||||
autocomplete?: false;
|
||||
choices?: ChoiceType[];
|
||||
});
|
||||
//# sourceMappingURL=base.d.ts.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAChG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,WAAW,+BAA+B,CAAC,IAAI,SAAS,4BAA4B;IACzF,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,4BAA4B,CAAC,CAAC,SAAS,4BAA4B,EAAE,CAAC;IACtF,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,CAAC,CAAC;CACT;AAED,oBAAY,2DAA2D,CACtE,IAAI,SAAS,+BAA+B,CAAC,4BAA4B,CAAC,EAC1E,UAAU,SAAS,iCAAiC,IAElD,CAAC,IAAI,GAAG;IACR,YAAY,EAAE,IAAI,CAAC;CAClB,CAAC,GACF,CAAC,IAAI,GAAG;IACR,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;CACtB,CAAC,CAAC"}
|
||||
Generated
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=base.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"base.js","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":""}
|
||||
Generated
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
|
||||
import type { ApplicationCommandOptionType } from './shared';
|
||||
export declare type APIApplicationCommandBooleanOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Boolean>;
|
||||
export declare type APIApplicationCommandInteractionDataBooleanOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Boolean, boolean>;
|
||||
//# sourceMappingURL=boolean.d.ts.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["boolean.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,oBAAY,kCAAkC,GAAG,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC;AAEvH,oBAAY,iDAAiD,GAAG,4BAA4B,CAC3F,4BAA4B,CAAC,OAAO,EACpC,OAAO,CACP,CAAC"}
|
||||
Generated
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=boolean.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"boolean.js","sourceRoot":"","sources":["boolean.ts"],"names":[],"mappings":""}
|
||||
Generated
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
|
||||
import type { ApplicationCommandOptionType } from './shared';
|
||||
import type { Snowflake } from '../../../../../globals';
|
||||
import type { ChannelType } from '../../../channel';
|
||||
export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
|
||||
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>[];
|
||||
}
|
||||
export declare type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Channel, Snowflake>;
|
||||
//# sourceMappingURL=channel.d.ts.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,WAAW,kCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC;IAC7E,aAAa,CAAC,EAAE,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,GAAG,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;CAC7E;AAED,oBAAY,iDAAiD,GAAG,4BAA4B,CAC3F,4BAA4B,CAAC,OAAO,EACpC,SAAS,CACT,CAAC"}
|
||||
Generated
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=channel.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":""}
|
||||
Generated
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
|
||||
interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
*/
|
||||
min_value?: number;
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted.
|
||||
*/
|
||||
max_value?: number;
|
||||
}
|
||||
export declare type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandIntegerOptionBase, APIApplicationCommandOptionChoice<number>>;
|
||||
export interface APIApplicationCommandInteractionDataIntegerOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Integer, number> {
|
||||
focused?: boolean;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=integer.d.ts.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["integer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,UAAU,sCACT,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC;IAC7E;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,oBAAY,kCAAkC,GAAG,2DAA2D,CAC3G,sCAAsC,EACtC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,iDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,OAAO,EAAE,MAAM,CAAC;IAClF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"}
|
||||
Generated
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=integer.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"integer.js","sourceRoot":"","sources":["integer.ts"],"names":[],"mappings":""}
|
||||
Generated
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
|
||||
import type { ApplicationCommandOptionType } from './shared';
|
||||
import type { Snowflake } from '../../../../../globals';
|
||||
export declare type APIApplicationCommandMentionableOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Mentionable>;
|
||||
export declare type APIApplicationCommandInteractionDataMentionableOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Mentionable, Snowflake>;
|
||||
//# sourceMappingURL=mentionable.d.ts.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mentionable.d.ts","sourceRoot":"","sources":["mentionable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,oBAAY,sCAAsC,GACjD,+BAA+B,CAAC,4BAA4B,CAAC,WAAW,CAAC,CAAC;AAE3E,oBAAY,qDAAqD,GAAG,4BAA4B,CAC/F,4BAA4B,CAAC,WAAW,EACxC,SAAS,CACT,CAAC"}
|
||||
Generated
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=mentionable.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mentionable.js","sourceRoot":"","sources":["mentionable.ts"],"names":[],"mappings":""}
|
||||
Generated
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
|
||||
interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
*/
|
||||
min_value?: number;
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted.
|
||||
*/
|
||||
max_value?: number;
|
||||
}
|
||||
export declare type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandNumberOptionBase, APIApplicationCommandOptionChoice<number>>;
|
||||
export interface APIApplicationCommandInteractionDataNumberOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Number, number> {
|
||||
focused?: boolean;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=number.d.ts.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,UAAU,qCACT,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,MAAM,CAAC;IAC5E;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,oBAAY,iCAAiC,GAAG,2DAA2D,CAC1G,qCAAqC,EACrC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,gDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"}
|
||||
Generated
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=number.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"number.js","sourceRoot":"","sources":["number.ts"],"names":[],"mappings":""}
|
||||
Generated
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
|
||||
import type { ApplicationCommandOptionType } from './shared';
|
||||
import type { Snowflake } from '../../../../../globals';
|
||||
export declare type APIApplicationCommandRoleOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Role>;
|
||||
export declare type APIApplicationCommandInteractionDataRoleOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Role, Snowflake>;
|
||||
//# sourceMappingURL=role.d.ts.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"role.d.ts","sourceRoot":"","sources":["role.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,oBAAY,+BAA+B,GAAG,+BAA+B,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;AAEjH,oBAAY,8CAA8C,GAAG,4BAA4B,CACxF,4BAA4B,CAAC,IAAI,EACjC,SAAS,CACT,CAAC"}
|
||||
Generated
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=role.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"role.js","sourceRoot":"","sources":["role.ts"],"names":[],"mappings":""}
|
||||
Generated
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
import type { LocalizationMap } from '../../../../../v10';
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
|
||||
*/
|
||||
export declare enum ApplicationCommandOptionType {
|
||||
Subcommand = 1,
|
||||
SubcommandGroup = 2,
|
||||
String = 3,
|
||||
Integer = 4,
|
||||
Boolean = 5,
|
||||
User = 6,
|
||||
Channel = 7,
|
||||
Role = 8,
|
||||
Mentionable = 9,
|
||||
Number = 10,
|
||||
Attachment = 11
|
||||
}
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure
|
||||
*/
|
||||
export interface APIApplicationCommandOptionChoice<ValueType = string | number> {
|
||||
name: string;
|
||||
name_localizations?: LocalizationMap | null;
|
||||
value: ValueType;
|
||||
}
|
||||
//# sourceMappingURL=shared.d.ts.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;GAEG;AACH,oBAAY,4BAA4B;IACvC,UAAU,IAAI;IACd,eAAe,IAAA;IACf,MAAM,IAAA;IACN,OAAO,IAAA;IACP,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,WAAW,IAAA;IACX,MAAM,KAAA;IACN,UAAU,KAAA;CACV;AAED;;GAEG;AACH,MAAM,WAAW,iCAAiC,CAAC,SAAS,GAAG,MAAM,GAAG,MAAM;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC5C,KAAK,EAAE,SAAS,CAAC;CACjB"}
|
||||
Generated
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ApplicationCommandOptionType = void 0;
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
|
||||
*/
|
||||
var ApplicationCommandOptionType;
|
||||
(function (ApplicationCommandOptionType) {
|
||||
ApplicationCommandOptionType[ApplicationCommandOptionType["Subcommand"] = 1] = "Subcommand";
|
||||
ApplicationCommandOptionType[ApplicationCommandOptionType["SubcommandGroup"] = 2] = "SubcommandGroup";
|
||||
ApplicationCommandOptionType[ApplicationCommandOptionType["String"] = 3] = "String";
|
||||
ApplicationCommandOptionType[ApplicationCommandOptionType["Integer"] = 4] = "Integer";
|
||||
ApplicationCommandOptionType[ApplicationCommandOptionType["Boolean"] = 5] = "Boolean";
|
||||
ApplicationCommandOptionType[ApplicationCommandOptionType["User"] = 6] = "User";
|
||||
ApplicationCommandOptionType[ApplicationCommandOptionType["Channel"] = 7] = "Channel";
|
||||
ApplicationCommandOptionType[ApplicationCommandOptionType["Role"] = 8] = "Role";
|
||||
ApplicationCommandOptionType[ApplicationCommandOptionType["Mentionable"] = 9] = "Mentionable";
|
||||
ApplicationCommandOptionType[ApplicationCommandOptionType["Number"] = 10] = "Number";
|
||||
ApplicationCommandOptionType[ApplicationCommandOptionType["Attachment"] = 11] = "Attachment";
|
||||
})(ApplicationCommandOptionType = exports.ApplicationCommandOptionType || (exports.ApplicationCommandOptionType = {}));
|
||||
//# sourceMappingURL=shared.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"shared.js","sourceRoot":"","sources":["shared.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,IAAY,4BAYX;AAZD,WAAY,4BAA4B;IACvC,2FAAc,CAAA;IACd,qGAAe,CAAA;IACf,mFAAM,CAAA;IACN,qFAAO,CAAA;IACP,qFAAO,CAAA;IACP,+EAAI,CAAA;IACJ,qFAAO,CAAA;IACP,+EAAI,CAAA;IACJ,6FAAW,CAAA;IACX,oFAAM,CAAA;IACN,4FAAU,CAAA;AACX,CAAC,EAZW,4BAA4B,GAA5B,oCAA4B,KAA5B,oCAA4B,QAYvC"}
|
||||
Generated
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
|
||||
interface APIApplicationCommandStringOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
|
||||
/**
|
||||
* For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`).
|
||||
*/
|
||||
min_length?: number;
|
||||
/**
|
||||
* For option type `STRING`, the maximum allowed length (minimum of `1`, maximum of `6000`).
|
||||
*/
|
||||
max_length?: number;
|
||||
}
|
||||
export declare type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandStringOptionBase, APIApplicationCommandOptionChoice<string>>;
|
||||
export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> {
|
||||
focused?: boolean;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=string.d.ts.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,UAAU,qCACT,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,MAAM,CAAC;IAC5E;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,oBAAY,iCAAiC,GAAG,2DAA2D,CAC1G,qCAAqC,EACrC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,gDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"}
|
||||
Generated
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=string.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"string.js","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":""}
|
||||
Generated
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
import type { APIApplicationCommandOptionBase } from './base';
|
||||
import type { ApplicationCommandOptionType } from './shared';
|
||||
import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput';
|
||||
export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
|
||||
options?: APIApplicationCommandBasicOption[];
|
||||
}
|
||||
export interface APIApplicationCommandInteractionDataSubcommandOption {
|
||||
name: string;
|
||||
type: ApplicationCommandOptionType.Subcommand;
|
||||
options?: APIApplicationCommandInteractionDataBasicOption[];
|
||||
}
|
||||
//# sourceMappingURL=subcommand.d.ts.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"subcommand.d.ts","sourceRoot":"","sources":["subcommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EAAE,gCAAgC,EAAE,+CAA+C,EAAE,MAAM,cAAc,CAAC;AAEtH,MAAM,WAAW,qCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,UAAU,CAAC;IAChF,OAAO,CAAC,EAAE,gCAAgC,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,oDAAoD;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,4BAA4B,CAAC,UAAU,CAAC;IAC9C,OAAO,CAAC,EAAE,+CAA+C,EAAE,CAAC;CAC5D"}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user