I need to turn off my iphone but my lock button is stuck?

What should i do i can't just leave it on all night

Remove the battery

Take out the battery

Put it on the charger then wait for it tio turn off i do that because i broke my lock button.

Go to settings then general. Once you get there go to accessibility. And then go to assistive touch
and turn it on. You should now see a white dot in the corner. Click it then go to device.next you click on "lock screen" to lock your phone, hold it to get the option to turn it off.