I literally only learned js to make a discord bot and i need help

basically im trying to make a bot that uses different sentences depending on the number that is generated with the Math.random method. here is the script,

case 'bedtime':
            if(args[1] === 'story'){
                var random = Math.floor(Math.random() * 3) + 1
                message.channel.sendMessage(random)
                if(random = 3)message.channel.sendMessage('text 1')
                if(random = 2) message.channel.sendMessage('text 2')
                if(random = 1) message.channel.sendMessage('text 3')
                   
            }else{
                message.channel.sendMessage('not a correct command!')
            }

I know it doesnt look right but i’ve tried many different ways and it still wont work.

Randell is 100% correct. This was my biggest issue when I started JS too… also making Discord/Twitch bot :wink:

I should also note that if you are using Discord,js sendMessage() is deprecated and to use send() ref: discord.js

thank you, it was a rookies mistake haha