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

Added InlineRequests #2

Merged
merged 3 commits into from
Sep 21, 2018
Merged

Added InlineRequests #2

merged 3 commits into from
Sep 21, 2018

Conversation

simeonschaub
Copy link
Contributor

No description provided.

Copy link
Owner

@Moelf Moelf left a comment

Choose a reason for hiding this comment

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

Thx for contributing, but I can't seem to get it to work.
Do you need to tune any Bot settings in telegram for this to work?

@simeonschaub
Copy link
Contributor Author

Yes, you need to enable it with the BotFather's /setinline command

@Moelf
Copy link
Owner

Moelf commented Sep 21, 2018

I have that enabled and I also gave it some placeholder, but when I @ my bot in a group chat, and put some text into it nothing shows up. And I don't see anything shows up in https://api.telegram.org/<bot_api>/getUpdates, which is where we getUpdates from?

@simeonschaub
Copy link
Contributor Author

That's weird. Did you use the example in README.md? Do regular messages work?

@Moelf
Copy link
Owner

Moelf commented Sep 21, 2018

Yea I copied the example in REAME which didn't work
(and also found a bug where welcomMsg don't accept incoming::AbstractString.)
My biggest question is why nothing shows up in the api /getUpdates page.

@simeonschaub
Copy link
Contributor Author

Could you double check if your bot is configured correctly? If it doesn't show up in getUpdates, there has to bd a problem with the bot itself. I'm using this code right now with my bot and everything works fine. The only thing might be, that when you send the same InlineQuery twice, it uses the previous cached result from the server, which might be why it doesn't show up.

@Moelf
Copy link
Owner

Moelf commented Sep 21, 2018

I stopped running all the instances of my bot and manually openning browser to look at api/getUpdates and see nothing related to the inline query.

One thing though, for my bot it seems that telegram is waiting for server to respond, I can't really send an inline message because once I entered @ mybot <text> the send button becomes a loading button.

@simeonschaub
Copy link
Contributor Author

You were right, welcomeMsg needs to accept a parameter, but other than that, the example works perfectly fine for me. The only thing I could still think of, did you put "bot" in front of your API key? This should probably be be done inside the module, but I didn't want to break existing code. Also, is the space after the @ a typo, because this could also be the reason it doesn't work.

@Moelf
Copy link
Owner

Moelf commented Sep 21, 2018

Yes that was a typo in my comment. I created a new bot and it seems inline query can be seen normally in the webpage, I will figure out what's going on and merge your PR. Thx again for the awesome contribution, first time actually receiving help!

@simeonschaub
Copy link
Contributor Author

Glad to contribute, seems like a cool project!

exported InlineQueryResultArticle type
@Moelf Moelf merged commit 8babb88 into Moelf:master Sep 21, 2018
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