Add cookie cache, doesnt save them anywhere, just a QOL thing
This commit is contained in:
parent
3f8178eff6
commit
d419da210c
5
index.js
5
index.js
|
@ -148,6 +148,7 @@ app.use((req, res, next) => { // Blacklist handler
|
|||
})
|
||||
|
||||
var rateLimits = {};
|
||||
var cookies = {}; // This gets cleared on restart
|
||||
|
||||
|
||||
app.get("/", (req, res) => {
|
||||
|
@ -352,6 +353,7 @@ discord.on("interactionCreate", async (interaction) => {
|
|||
style: Discord.TextInputStyle.Paragraph,
|
||||
required: false,
|
||||
placeholder: "ROBLOSECURITY cookie",
|
||||
value: cookies[interaction.user.id] ? cookies[interaction.user.id] : null,
|
||||
maxLength: 2000
|
||||
}
|
||||
]
|
||||
|
@ -362,6 +364,9 @@ discord.on("interactionCreate", async (interaction) => {
|
|||
case Discord.InteractionType.ModalSubmit:
|
||||
assetId = interaction.fields.getTextInputValue("assetId");
|
||||
cookie = interaction.fields.getTextInputValue("cookie");
|
||||
if (cookie) {
|
||||
cookies[interaction.user.id] = cookie;
|
||||
}
|
||||
bulk([new String(new Number(assetId))], cookie ? cookie : null).then((data) => {
|
||||
if (data.data[assetId].status == "failure") {
|
||||
return interaction.reply({
|
||||
|
|
Loading…
Reference in a new issue