Xithrius / twitch-tui

Twitch chat in the terminal.
https://xithrius.github.io/twitch-tui/
Apache License 2.0
437 stars 32 forks source link

Emotes don't seem to be downloaded after editing config and running twt #611

Closed LukyLurks closed 3 months ago

LukyLurks commented 3 months ago

Describe the bug:

Emotes don't appear in the terminal or in ~/.cache/twt/ after following the configuration instructions.

To Reproduce:

  1. sudo pacman -Syu twitch-tui
  2. run twt in kitty, complete the config wizard, then exit with q
  3. set twitch_emotes and betterttv_emotes to true in ~/.config/twt/config.toml
  4. twt then connect to any chat
  5. Alt+e to bring up the emote menu: it is empty
  6. send "PogChamp" in the chat: the text "PogChamp" appears and not the emote

Expected behavior:

I expected either the menu to contain emotes, or that the emote PogChamp would appear in the terminal when sending "PogChamp". I also expected ~/.cache/twt/ to have been populated at some point in the process, as indicated in the documentation.

Screenshots:

System:

Additional context: I also tried uninstalling twitch-tui with pacman, removed the config and cache directories, reinstalled with cargo (twitch-tui version 2.6.10), and ran the exact same steps, with the same results.

Xithrius commented 3 months ago

Thanks for the issue. I'll try to diagnose what's going on within the next few hours.

Xithrius commented 3 months ago

I haven't been able to reproduce the issue as of now, although I am running the same system as you. I'll do a deeper dive in the near future.

LukyLurks commented 3 months ago

Thanks for the quick replies! Feel free to ask for any details/screenshots/screen recordings, or if you need me to try things, when you get to it. I couldn't find similar reported issues, so I'm not excluding the possibility that I just did something silly on my end; I'll report back if it ends up being the case.

Xithrius commented 3 months ago

Could you send your entire config? Without the token, of course.

LukyLurks commented 3 months ago

Could you send your entire config? Without the token, of course.


[twitch]
username = "luky75"
channel = "luky75"
server = "irc.chat.twitch.tv"
token = "redacted"

[terminal] delay = 30 maximum_messages = 500 verbose = false first_state = "Dashboard"

[storage] channels = false mentions = false

[filters] enabled = false reversed = false

[frontend] show_datetimes = true datetime_format = "%T" username_shown = true palette = "pastel" title_shown = true margin = 0 badges = false theme = "dark" username_highlight = true state_tabs = false cursor_shape = "user" blinking_cursor = false inverted_scrolling = false show_scroll_offset = false twitch_emotes = true betterttv_emotes = true seventv_emotes = false frankerfacez_emotes = false favorite_channels = [] recent_channel_count = 5 border_type = "plain" hide_chat_border = false right_align_usernames = false show_unsupported_screen_size = true

Xithrius commented 3 months ago

Odd, that works for me as well. Did you modify your kitty config in any way that you're aware of?

LukyLurks commented 3 months ago

I just changed the fonts and colors in kitty.

Xithrius commented 3 months ago

How long did you wait before exiting the terminal after typing PogChamp? I'm having a feeling it could be due to connection issues to twitch servers, which has caused problems in the past.

LukyLurks commented 3 months ago

Not very long, maybe a minute. I just tried now and I'm keeping the window open for a bit

Xithrius commented 3 months ago

Did you use https://twitchtokengenerator.com/ or https://twitchapps.com/tmi/ to generate your token?

LukyLurks commented 3 months ago

Neither, I followed those steps from Streamlink's docs:

In order to get the personal OAuth token from Twitch's website which identifies your account, open Twitch.tv in your web browser and after a successful login, open the developer tools by pressing F12 or CTRL+SHIFT+I. Then navigate to the "Console" tab or its equivalent of your web browser and execute the following JavaScript snippet, which reads the value of the auth-token cookie, if it exists:

document.cookie.split("; ").find(item=>item.startsWith("auth-token="))?.split("=")[1]

Then I would connect to my channel with twt and get an "Improperly formatted auth" error message from Twitch. So I prepended oauth: to the string I got with the above steps, and then I could successfully connect and send messages.

(Still no change since my previous comment, by the way)

Xithrius commented 3 months ago

Ah, I went the streamlink way, and I was able to replicate the issue.

You need to use one of the two websites that I posted above. The first gives more scopes if you want them, described in the default configuration. However, I suggest using the second link, twitchapps.com/tmi, as it gives all scopes you need for basic usage, including emotes.

LukyLurks commented 3 months ago

Yup, I got a new token with https://twitchapps.com/tmi and everything works as intended now. Thank you so much for your help!

Xithrius commented 3 months ago

No problem. Have a good one!