Skip to content

Commit

Permalink
fix: Use hardcoded size limit for interactions
Browse files Browse the repository at this point in the history
Nitro/server boost upload limits do not seem to currently apply to interaction responses.
  • Loading branch information
TheEssem committed Dec 25, 2024
1 parent 189f1c0 commit 1cfba4c
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions events/interactionCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,7 @@ export default async (client, interaction) => {
});
} else if (typeof result === "object") {
if (result.contents && result.name) {
let fileSize = 10485760;
if (interaction.guild) {
switch (interaction.guild.premiumTier) {
case 2:
fileSize = 52428800;
break;
case 3:
fileSize = 104857600;
break;
}
}
const fileSize = 10485760;
if (result.contents.length > fileSize) {
if (process.env.TEMPDIR && process.env.TEMPDIR !== "" && interaction.appPermissions.has("EMBED_LINKS")) {
await upload(client, result, interaction, commandClass.success, true);
Expand Down

0 comments on commit 1cfba4c

Please sign in to comment.