How to End an Online Conversation Politely
Thank the person, state that you need to leave and offer a future conversation only if you want one. You do not need to invent an excuse to end a chat.
Use a clear closing
A direct statement prevents the other person waiting for a reply you are no longer available to send. Try "I need to get back to my evening; thanks for the chat." You can be warm without explaining private details of your schedule.
Avoid promises you do not mean
Say "talk another time" only if that is a genuine possibility. If you want to stop ongoing contact, make the boundary clear instead of suggesting a specific plan you intend to avoid. A polite ending does not require staying in a conversation that makes you uncomfortable.
Close games and calls as well
Before another match, say whether you have time. Let someone know when you are leaving a planned call, but do not negotiate endlessly if they pressure you. Use the platform's blocking or reporting tools when needed; politeness does not override your ability to stop contact.
An example to try
For a game: "That was fun. I am stopping here, but thanks for the round." For an ordinary chat: "I enjoyed the music recommendations. I need to go now." Neither requires a false promise of another session.