Nightbot randomly appeared one time, and I cant get it to leave

It cannot join without having been joined by you, the broadcaster. It isn’t “randomly” joining at all.

If it’s not responding to commands then it isn’t in the channel. Nightbot runs multiple processes, and the Twitch process which makes it appear in the user list can get into a bugged state for some channels. It eventually fixes itself when the process restarts periodically.