Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emotions and nicknames translating #27

Open
artstylee opened this issue Jul 16, 2021 · 4 comments
Open

emotions and nicknames translating #27

artstylee opened this issue Jul 16, 2021 · 4 comments

Comments

@artstylee
Copy link

artstylee commented Jul 16, 2021

  1. when you mention someone @Nickname without a message the bot thinks that it is ENGLISH and trying to translate the nickname. is that possible to not translate nicknames. at least with empty messages?
  2. when people spam with emotions and smiles the bot is trying to translate it. i solved it by setting to ignore empty language ' ' but not sure if that is a right solution
@artstylee
Copy link
Author

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)

@didotb
Copy link
Contributor

didotb commented Jul 20, 2021

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のスタッフを怒らせると思います。

CLARIFICATION (明確化)

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 で翻訳されています。

@kenfehling
Copy link

kenfehling commented Jul 24, 2021

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?

@didotb
Copy link
Contributor

didotb commented Jul 25, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants