Solo
Solo
DIAdiscord.js - Imagine an app
Created by Solo on 7/26/2023 in #djs-questions
Moving from v13, autoArchiveDuration no longer accepts 'MAX' as it requires int32
Ahhh gotcha, awesome, thanks! And definitely agree on the enum part, just couldn't find the deprecation replacement anywhere. Cheers, have a nice evening!
11 replies
DIAdiscord.js - Imagine an app
Created by Solo on 7/26/2023 in #djs-questions
Moving from v13, autoArchiveDuration no longer accepts 'MAX' as it requires int32
I'm guessing if I just do OneWeek as a value, it'll automatically scale it down if I don't have enough boosts, but that's a bit of an ugly fix
11 replies
DIAdiscord.js - Imagine an app
Created by Solo on 7/26/2023 in #djs-questions
Moving from v13, autoArchiveDuration no longer accepts 'MAX' as it requires int32
Where you were previously able to pass 'MAX' as a value, which was cool because it would automatically select the highest value for you
11 replies
DIAdiscord.js - Imagine an app
Created by Solo on 7/26/2023 in #djs-questions
Moving from v13, autoArchiveDuration no longer accepts 'MAX' as it requires int32
11 replies
DIAdiscord.js - Imagine an app
Created by Solo on 7/26/2023 in #djs-questions
Moving from v13, autoArchiveDuration no longer accepts 'MAX' as it requires int32
Package version: v14.11.0 Node version: v16.16.0 Code:
const thread = await message.channel.threads.create({
name: `Thread by ${message.member.displayName}`,
autoArchiveDuration: 'MAX'
});
const thread = await message.channel.threads.create({
name: `Thread by ${message.member.displayName}`,
autoArchiveDuration: 'MAX'
});
Error:
Unhandled promise rejection: DiscordAPIError[50035]: Invalid Form Body
auto_archive_duration[NUMBER_TYPE_COERCE]: Value "MAX" is not int32.
Unhandled promise rejection: DiscordAPIError[50035]: Invalid Form Body
auto_archive_duration[NUMBER_TYPE_COERCE]: Value "MAX" is not int32.
11 replies