Of course Discord encrypts them.
RandomHost made a very good explanation on that.
Discord just doesn't store them encrypted (or has a master-key for every account, which would be a far better solution) to be able to look into them, to make sure that there is no illegal content involved (and/or sell them).
Same is also true for TeamSpeak, every offline message you ever send with TeamSpeak (as if anybody ever used that....) is stored completely "un-encrypted" on the TeamSpeak server.
This mean the hoster/admin can look into it and you need to trust them.
I'm also unsure about TeamSpeak using End-to-End for voice, since that would mean quite a lot of key handling for huge channels/servers.
But maybe someone with more indepth TeamSpeak-tech knowledge can tell us how the voice encryption really works.
But the TeamSpeak client chat message are end-to-end encrypted. But are also not permanent or are stored in plain txt files on your PCs, which is also "not encrypted".
So, if you are willing to give up the comfort of a chat history, then yes. TeamSpeak is more secure in that regard, because the hoster is unable to see them. But this also mainly due the fact that they are never stored serverside in the first place, because TeamSpeak doesn't offer that "chat history". Only as plain .txt files on client side.
So don't play this "Discord is seeing my data card". Because with TeamSpeak this can be the same or even worse if you consider that file transfer is still not encrypted and voice is only optional.
Discord gives you the "encryption against third parties" on everything by default.