Is it possible to send premium-only custom emojis with a Telegram Client? - telegram

Recently, Telegram released a new feature - Custom Emojis. They instantly became available to users, but there are no instructions on how to send them using a Telegram bot. Is it even possible within the API? And specifically on Telegraf?

This update describes methods that may be useful to you. I haven't tested them myself yet, but I think this is what is needed. I will write about the results as soon as I test it myself.

Related

Telegram Bot - get all chats list

My telegram bot database was accidentally deleted after I moved it to a new server.
Is there a way to obtain a list of all the numeric IDs of all users who have started the bot in the past? In reading Telegram's documentation, I did not find any solution (although I've seen someone do it before and I am certain it can be accomplished); I found out from searches that it should probably be accomplished on the client side and using something like getDialogs.
https://core.telegram.org/method/messages.getDialogs
Would anyone be able to assist me with that?
Is there a way to obtain a list of all the numeric IDs of all users who have started the bot in the past?
No, Telegram can't offer a list like that.
If an update is removed from the getUpdates() call, it's gone for good.
I found out from searches that it should probably be accomplished on the client side and using something like getDialogs.
The getDialogs you're looking at is part of the Telegram Core, used to create your own Client. This can't be used as a Bot.
So If you don't have a copy of your own, there won't be a way to tell all the users who have talked with your Bot, unless you ask them yourself ;)

Disable digest email in Application insights

I'm using Application insights for outside-in testing, but my code is not instrumented with it. I don't want to receive the weekly email summary about my service, since most columns are blank.
How can I disable the email being sent? (Note I do not want to just unsubscribe myself from it)
It appears this is not available yet, though someone has proposed it on the Application Insights uservoice site, and AI folks have commented on it:
https://feedback.azure.com/forums/357324-application-insights/suggestions/14444583-ability-to-disable-weekly-digest
I'd suggest upvoting that if you need it.
While not what you want, it looks like the only option at this time is to unsubscribe.
As of 6/18/2018, application insights is no longer sending digest emails at all.
see https://learn.microsoft.com/en-us/azure/application-insights/automate-custom-reports for details, the suggestion is to use other tools, like Logic Apps or Flows to query and generate your own content.

can Telegram CLI mimick Telegram bots?

I saw on internet that there is some programs that can use Telegram CLI.
I want to choose between them
for Telegram bot API there is much more documents explaining its functionality, but for CLI there isn't much that explains its features
it seems the only way to know about is to experiment with it.
unfortunately i don't have a linux distro installed on my pc so experimenting isn't an option right know.
so I thought to ask from people who already used it
I know about Telegram bot api, its powers and its limitations
here is my questions:
what can I do using Telegram CLI that I can't do with with bot api, and vice versa?
Telegram bot API:
do not require to register new Telegram account, so you don't need to have another phone number;
bot cannot write to user first, only after user sends a first message to bot;
already has the commands interface (/command);
can do stuff by simple HTTP POST (by sending request via cURL, for example). So you can hook to this tons of stuff (notifications about new articles at the website or so);
you can rather easily create lots of them;
you can write you own implementation in almost any programming language;
you have a list of bots you have created (thanks to #BotFather). If you have lost somehow control of your bot - just revoke the token via #BotFather and it's yours again;
pretty simple to use.
Telegram client application (in this case - CLI):
requires new Telegram account registration with phone number;
acts like any other actual Telegram user (can write to other users first, without invitation). Well, that's a good thing;
not really good cross-platform abilities for now (some lack of CLI-realisations);
not really easy to install and use;
you have to implement the commands handling part;
if you have lost your phone number - pretty much you lose this account, because it's not like you would make some precautions for CLI client account. So you will have to register a new one and repeat the setting procedure for client.
In conclusion, bots actually got rid of CLI clients, in my opinion. I had CLI account right to the moment the bots appeared. After that I deleted it and created a bot. And not just one :)
So, bots are for the "robot" stuff, and real accounts are for the real people.
The Telegram CLI library interacts directly with their MTproto protocol, which means it's like their desktop/mobile app...but for the console. You can send messages from one phone number to another. This means that when authenticating with the CLI application, you use your real number as if you were logging into the mobile application.
I wouldn't suggest using it for bot behavior as you have to write an application that wraps the Telegram CLI and parses the log file as it is displayed...since it doesn't implement all the MTproto methods and the outputs for the log file are custom...it can be quite annoying and different than what you would expect.
With Telegram CLI you can send a number to another Telegram user without having them initiate the conversation first (since it functions just like a normal Telegram client) where the Bot API requires the user to add the Bot and start interaction before the Bot knows you are there.
previous answers are almost correct. Two different interfaces for different purposes:
Telegram Bot API allows to develop a Telegram Bot.
Telegram CLI (as this one, as an implementation example: https://github.com/vysheng/tg) are telegram client implementations, running from command line, based on MTproto protocol, as Chris Brand said.
As a bot developer, I'm interested to have a TG CLI interface (2) to automatize dialogs tests, with bash scripts, with a bot made with (1).

Query HealthKit data via REST API

Is it possible to get data from Healthkit the same way as you would query regular API (With user's consent) to store in my webapp?
Something like: healthkit.com/api/v1/user/GetWeight
If yes, where can I find a list of available methods?
If not, are there any workarounds?
You'll have to build:
your own REST API service to store and retrieve the desired data;
an iOS app that accesses the data on-device using the HealthKit SDK and POSTs it to your API.
Neither step is trivial. Good luck!
An alternative may be to install Google Fit on the iPhone, which would connect to healthkit and sync that data to the cloud, which can then be queried via Fit's REST API https://developers.google.com/fit/rest/
If it's a REST/json API you want it's not available and i guess it never will be.
HealthKit is just a standard API available in the IOS8 SDK accessible from application running on a iDevice and written in objective-c/swift.
Not sure if this question is still relevant for someone, but now you have the option to use shortcuts to gather the desired health data and post it to your own api, also you may use automation in order to make it all happen without any hustle.

How do I send Issues into BitBucket by email?

I Love BitBucket.org
But is there a way to configure BitBucket to accept email and automatically put them into my 'New' Issue list in the issue tracker?
BitBucket sends out email notifications, but I want something the other way around. I don't want to have to go in and create an issue manually each time someone emails me about a problem. I want to forward those emails to Bitbucket so problems to go directly into the issue tracker via E-Mail.
And: Similarly, can you configure Bitbucket so that it listens for code check-ins and it auto-magically set issues to complete/fixed etc.?
Is there a way?
I don't think there is a way to submit issues via email and now that Atlassian has bought Bitbucket I doubt that they will spend much time improving or enhancing the issue tracking inside Bitbucket as their main product (JIRA) is an very comprehensive issue tracker.
I would sooner expect some sort of integration of the two and a phase out of the current issue tracker. But then we will probably have to pay :-(
Re adding emails:
I want to forward those emails to Bitbucket so problems to go directly into the issue tracker via E-Mail.
Yes you can do this - you need to have an endpoint that receives emails, so for example sendgrid allows this (see Sendgrid webhooks docs), and will call a webhook on your server whenever an email comes in. You then need a bit of glue code on the server to post that issue to bitbucket via the bitbucket API (see the bitbucket api docs). So there are two parts to doing this, and you will need to write some code I think.
I'm currently working on a tool to do just this at Project Page. If anyone would like to try it out let me know. I'm also planning to let it interrogate the user to get a bit more detail about things like priority and urls associated with the problem.
Re the second part of your question:
Similarly, can you configure Bitbucket so that it listens for code check-ins and it auto-magically set issues to complete/fixed etc.?
Yes you can close issues automatically - just use the text fixes #n, so for example:
fixes #123
in the commit message, where 123 is the number of the issue you want to close.
There is a API to create issue http://confluence.atlassian.com/display/BBDEV/Issues.
And a custom script which may or could be able to fetch email and post to issue tracker.
Yes, it's possible. Bitbucket has a robust REST API that lets you do it at least two ways:
Option 1: 3rd Party Service
Use an online API automation service like
Zapier or
Integromat
(Click those links for specific email/Bitbucket integration examples.)
You have a couple of options with this approach. With Zapier, for example, you can have a dedicated Issue-only Gmail address, and any email sent to it creates a new Issues ticket. OR you can automatically create Issues just by assigning a specific label to an email in an existing Gmail account.
Oddly, IFTTT doesn't currently offer Bitbucket integration.
Option 2: Write Your Own Server Script
If you have server access, you can configure your Message Transfer Agent to send certain emails to a PHP script that will create a Bitbucket Issue.
The script will need to use the Bitbucket API repositories > {username} > {repo_slug} > issues > POST method.
A great how-to article for this approach is Process Incoming Mail with PHP Script with Exim.

Resources