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

Sextou handler #2

Merged
merged 7 commits into from
Apr 3, 2023
Merged

Conversation

Luisgustavom1
Copy link
Contributor

a simple handler that reads all messages channel and if the message content contains the Friday trigger ("Friday") sends the gif if it is indeed Friday.

What would you do differently to my code?

Is to filter by specific channel, to read messages only from that channel?

handlers/friday.go Show resolved Hide resolved
handlers/friday.go Show resolved Hide resolved
handlers/friday.go Show resolved Hide resolved

query := req.URL.Query()
query.Add("q", q)
query.Add("key", "LIVDSRZULELA")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this line to get the token from the environment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't understand, you say to edit specifically the commit that entered this key? Because in the last commit i changed to get from the env

@liverday liverday merged commit 681949f into medeirotech:main Apr 3, 2023
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

Successfully merging this pull request may close these issues.

2 participants