GithubHelp home page GithubHelp logo

telegram's People

Contributors

m0sth8 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

telegram's Issues

Handle group migration error

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

send html message error

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"}]

Implement new game API in a bot

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.

Api for deleting a post by bot

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?

invalid character '<' looking for beginning of value

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.