Open artstylee opened 3 years ago
and bot is going down every 5 minutes when no one text in the chat. is that possible to update the bot every 5 min so it will not fall (auto disconnect from twitch)
based on the Twitch API, the usernames/nicknames are part of the raw_data
attribute of the Message
class, and so is the actual message. It is virtually impossible to tell them apart. Unless Twitch Username database is queried, which in this case would make this app a lot heavier on systems as well as the user's internet (it would query each word to see if that word is a username or not). Not to mention I believe that would upset Twitch Staff.
TwitchのAPIによると、ユーザー名/ニックネームは、Message
クラスのraw_data
属性の一部であり、実際のメッセージも同様です。これらを見分けることは事実上不可能です。Twitchのユーザー名データベースにクエリをかけない限り、この場合、このアプリはユーザーのインターネットだけでなく、システムにも大きな負担をかけることになります(各単語がユーザー名であるかどうかをクエリすることになります)。言うまでもなく、それはTwitchのスタッフを怒らせると思います。
#
Twitch will be upset by how much query you're doing over an extremely short period of time, most likely the bot will not be able to access Twitch API for a certain period of time.
Twitchは、あなたが極めて短い期間に行っているクエリの量に動揺し、ほとんどの場合、ボットは一定期間Twitch APIにアクセスできなくなります。
-- Translated with DeepL -- DeepL で翻訳されています。
Maybe it can be guessed if a word is a username or not by the presence of underscores, numbers, etc. Also does the '@' appear as part of it?
if the message does contain the @ tag before the username then maybe you can add a few lines in the code if you're comfortable with that. You can use the line 246
in twitchTransFN.py
file as a reference in what you should do. Basically detect the @
character using startswith()
, then replacing it with nothing.