I have been struggling with this issue for quite some time
I wanna see what options I have for a ban duration. However
the official discord documentation is barebones on this subject
guildMember.ban({ days: 7, reason: 'They deserved it' })
.then(console.log)
.catch(console.error);
This code bans a guildmember for 7 days
But aside from days are there minutes ? Hours ? Etc ?
It doesn't ban the member for 7 days. It just deletes 7 days of their messages. To actually ban them for ? days, ? minutes, ? hours, etc., you need to set a timer yourself (e.g. setTimeout, although the timer will be reset when you restart the bot).
Days is not the duration. Days specifies the days to delete messages in. Its like when you try to ban someone on discord, it gives you the option to select for how long you want to delete past messages. To implement a temp ban, you have to manually write code that unbans them.
Reference: https://discord.js.org/#/docs/main/stable/typedef/BanOptions