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

There should be some documentation on how to use tags #12

Open
treuks opened this issue Apr 23, 2022 · 1 comment
Open

There should be some documentation on how to use tags #12

treuks opened this issue Apr 23, 2022 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@treuks
Copy link

treuks commented Apr 23, 2022

I tried to figure out how to get the display-nametag to use in a command, and there was not a single line of documentation on how to access the tags.

I gave the bot the ["tags", "membership", "commands"] capabilities, and attempted to get the display-name tag like so

  def handle_message("k!" <> command, sender, chat, tags) do
    case command do

      "test123" ->
        say(chat, "#{tags["display-name"]}, test123")

      _ ->
        say(chat, "unrecognized command")
    end
  end

However, it did not work. I tried putting the tags from the handle message into a debug line, and it did not give me any.
At this point, I'm not sure if I'm in the wrong here, or the library.

Please send help, thank you.

@ryanwinchester
Copy link
Owner

ryanwinchester commented Apr 23, 2022

Tags look like:

%{
  "@badge-info" => "subscriber/25",
  "badges" => "broadcaster/1,subscriber/0",
  "color" => "#333333",
  "display-name" => "JohnDoe"
}

There are no docs for it yet because I want to change them a bit. Like additional parsing of badges, etc.

@ryanwinchester ryanwinchester added the documentation Improvements or additions to documentation label Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants