You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to introduce SendData: an object that specifies all necessary information in order to send a message. This can be a string, or { text: string } or { photo: photo }, etc. Optionally, more parameters can be contained.
This lets us add ctx.send. In grammY 2.0, you can then call ctx.send("message") and ctx.send({ photo }) instead of ctx.reply("message") and ctx.replyWithPhoto(photo).
Similar objects will be introduced for editing messages.
Similar objects will be introduced for calling arbitrary API methods.
This has many advantages:
ctx.reply has nothing to do with replies so the name is misleading
it is currently impossible to write a function that generates message data—if you want modularity, you must pass around the context object, which is bad
menus have no way to edit their own content when they are being navigated to, and send data will make this much better
Naming ideas:
send data
send template
send spec objects
send blueprints
The text was updated successfully, but these errors were encountered:
We want to introduce
SendData
: an object that specifies all necessary information in order to send a message. This can be a string, or{ text: string }
or{ photo: photo }
, etc. Optionally, more parameters can be contained.This lets us add
ctx.send
. In grammY 2.0, you can then callctx.send("message")
andctx.send({ photo })
instead ofctx.reply("message")
andctx.replyWithPhoto(photo)
.Similar objects will be introduced for editing messages.
Similar objects will be introduced for calling arbitrary API methods.
This has many advantages:
Naming ideas:
The text was updated successfully, but these errors were encountered: