When you install a module in NPM you will not be able to have the same module in 2 different versions. What you can do is have 2 different modules but with the same function.
You will do this:
npm i discord.js@11
Then, you will rename the folder created in node_modules. The folder is called discord.js, you will rename it to discord.js_v11
Now, you will install v12 with
npm i discord.js@12
And now, you will do the same with the other, but instead of putting discord.js_v11 you will change it to discord.js_v12
Now, in the main file of your bot you will do this:
const DiscordV11 = require("discord.js_v11")
const DiscordV12 = require("discord.js_v12")
Node will understand that they are 2 different modules, then it will accept it for you.
I hope to be helpful.