Depending on what your use case for collecting chat logs are, you may be in violation for that if you’re creating a public database. The chat logs will also be collecting information about end users unless you make everything anonymous.
Also, again depending on use case, this may apply to you:
So if your chat logs are for marketing or research (which includes noncommerial projects so it sounds like that may include you), you would need to contact Twitch and enter into a specific agreement to cover that.
Also, Twitch ID’s likely count as an “Online Identifier”, and thus personal information according to the GDPR. As such to comply with the GDPR you would need to obtain consent, as well as document information on how users and channels can have their data removed from your database should they no longer wish to consent at a later date. If you’re collecting all this data without any consent at all, or even warning that data is being collected, stored, and used in some way, then again that’s potentially a violation of the GDPR.
As always, Wheaton’s Law applies here too. If people don’t want you to gather their data and chat logs, just don’t. It’s a pretty bad way to go about things to just go harvesting peoples data, so just make whatever service you are planning Opt-In so only channels that want your service will have data collected by it.
Note: I’m not a legal expert so have not been speaking with any legal certainty here.