bot-api / telegram Goto Github PK
View Code? Open in Web Editor NEWImplementation for the telegram bot API
License: MIT License
Implementation for the telegram bot API
License: MIT License
Get error If group becomes supergroup:
2016/05/22 17:20:13 request map[data:chat_id={NUMBER}&parse_mode=Markdown&text=exit url:https://api.telegram.org/bot{TOKEN}/sendMessage]
2016/05/22 17:20:13 response map[status_code:400]
2016/05/22 17:20:13 response map[data:{"ok":false,"error_code":400,"description":"Bad Request: group chat is migrated to a supergroup chat","parameters":{"migrate_to_chat_id":NEW_NUMBER}}]
2016/05/22 17:20:13 apiError: Bad Request: group chat is migrated to a supergroup chat
html : <a>xxx</a>
mycode:
msg := telegram.NewMessagef(update.Chat().ID, newListStr, arg)
msg.ParseMode = telegram.MarkdownMode
_, err := api.SendMessage(ctx, msg)
error
response map[data:{"ok":false,"error_code":400,"description":"Bad Request: can't parse entities in message text: Unexpected end of name token at byte offset 8"}]
https://core.telegram.org/bots/games
https://core.telegram.org/bots/api
New tools for building HTML5 games.
New method sendGame, new object InlineQueryResultGame, new field game in Message.
New parameter url in answerCallbackQuery. Create a game and accept the conditions using Botfather to send custom urls that open your games for the user.
New field callback_game in InlineKeyboardButton, new fields game_short_name and chat_instance in CallbackQuery, new object CallbackGame.
New methods setGameScore and getGameHighScores.
Other changes
Making life easier for webhook users. Added a detailed Guide to All Things Webhook that describes every pothole you can run into on the webhook road.
New method getWebhookInfo to check current webhook status.
Added the option to specify an HTTP URL for a file in all methods where InputFile or file_id can be used. Telegram will get the file from the specified URL and send it to the user. Files must be smaller than 5 MB for photos and smaller than 20 MB for all other types of content.
Use the new url parameter in answerCallbackQuery to create buttons that open your bot with user-specific parameters.
Added new field switch_inline_query_current_chat in InlineKeyboardButton.
Added caption fields to sendAudio, sendVoice, InlineQueryResultAudio, InlineQueryResultVoice, InlineQueryResultCachedAudio, and InlineQueryResultCachedVoice.
New field all_members_are_admins in the Chat object.
Certain server responses may now contain the new parameters field with expanded info on errors that occurred while processing your requests.
Hi. I'm going to build a telegram bot for my website. When I create a new post in my website, the bot will send the post to my telegram channel directly. There is some api for doing this.
But I want this functionality, when I delete a post in my site, bot would be able to delete the post in the channel. I searched, but found nothing. Will be such a api for doing this?
status code: 409
received: {"ok":false,"error_code":409,"description":"[Error]: Conflict: another webhook is active"}
Hi, any plan to support Bot API 3.6 in near future? Thx.
Could you include virtual hosting by bot tokens (e.g. /bot ) in the WebHook's server code so that multiple bots can be hosted and thus reuse ports
When I leave my bot (based on the boilerplate of the example echo bot) on e.g. overnight, it goes like this:
2017/12/06 02:21:54 api.go:38: response map[data:<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.12.2</center>
</body>
</html>
]
2017/12/06 02:21:54 langbot.go:74: invalid character '<' looking for beginning of value
The main bot loop is:
err = bot.Serve(netCtx)
if err != nil {
log.Fatal(err)
}
I guess my bot could ignore this error, and enter the loop again. But is it the way it's supposed to work? If it couldn't access Telegram, it would continue crashlooping forever.
P.S. I mistakenly submitted this earlier to go-telegram-bot-api/telegram-bot-api#118.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.