-
Notifications
You must be signed in to change notification settings - Fork 114
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
Add Vercel hosting guide #543
Add Vercel hosting guide #543
Conversation
Co-authored-by: Roj <[email protected]>
Co-authored-by: Roj <[email protected]>
Co-authored-by: Roj <[email protected]>
Co-authored-by: Roj <[email protected]>
I wonder how many more times this will go back and forth :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Sorry guys, I don't usually make many contributions to projects. Thanks for your reviews and I hope next time I make less bugs, I just wanted to do some documentation to help new people :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing contribution, thank you so much!
Thank you guys. I hope to be useful in the future, I will be aware of possible PR where I can help. If necessary I can also translate this same Vercel page into Spanish. |
Co-authored-by: Roj <[email protected]>
Co-authored-by: Roj <[email protected]>
site/docs/hosting/vercel.md
Outdated
Other useful commands are: | ||
|
||
- Info about webhook: `https://api.telegram.org/bot{BOT_TOKEN}/getWebhookInfo` | ||
- Delete webhook: `https://api.telegram.org/bot{BOT_TOKEN}/deleteWebhook` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this is
- more than necessary, and
- inconsistent: we have not included it in the other guides.
- We’re also working on feat: create SetWebhookUtil component #523.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I delete it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it would be way better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As soon as this PQ is done and merged, we should probably copy this paragraph to the other guides, as well. Not very DRY, but very useful indeed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
That's amazing to hear! So far @habemuscode is the only Spanish translator and we need all the help we can get. I'll let you know when the translations are starting. Feel free to hit me up on TG at https://knorpelsenf.t.me. |
Co-authored-by: Roj <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks astonishing to me, thank you soo much!
@@ -70,35 +70,35 @@ It should look roughly like this: | |||
```ts | |||
import { Bot, webhookCallback } from "grammy"; | |||
|
|||
const bot = new Bot(process.env.BOT_TOKEN); // <-- insert your bot token from environment variable | |||
const bot = new Bot(process.env.BOT_TOKEN); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed that this won't typecheck
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This = the code examples?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line. On Node, the env value may be absent but the Bot constructor requires the token.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you refer to this?
if (process.env.BOT_TOKEN === undefined) {
throw new TypeError('BOT_TOKEN must be provided!');
}
const token: string = process.env.BOT_TOKEN;
const bot = new Bot(token);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KnorpelSenf Yes, should we do something like that?^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thanks!
Just check the variable token directly ;)
As I asked in the grammY Telegram group, I have recently developed a bot with grammY. This tool is amazing because it is so easy to use!
I found an example to deploy it on Vercel in the examples repository that was very helpful. I thought it would be a good idea to add a guide on Vercel in the web hosting section, so here it is!