Can I use telegram API methods for Telegram Bot? - laravel

can I use some methods from here - Telegram API for my Telegram Bot. I am asking because I need in a methods which no present in Telegram Bot Api. If yes, please write How I can to do that.

No, you can't. Those methods are for Telegram Clients, not for bots. Bots can only use the methods listed here.

As the other contributor has already answered, you can't normally use Telegram API inside bots.
But you can actually leverage some libraries like (MadelineProto (php), Pyrogram (python), Telethon (python), etc...) to create a userbot instance behind the scene and the bot can delegate the tasks that requires Telegram API to the userbot in the background.

Related

Is it possible to insert animated emoji into the sending text using the Telegram Api?

Telegram has a premium subscription that allows you to write a message and add to the text (important! not separately, like stickers, but specifically to the text). Is it possible to do something similar with the Telegram API?
I looked in the documentation and found only https://core.telegram.org/api/animated-emojis#emoji-reactions, there were animated reactions to messages, sending animated emoji like stickers, but not what I seem to need.
Animated emoji are a "premium" feature of Telegram and so far bots can't use them. The documentation that you linked is part of the "Telegram API", i.e. the API that user clients like your mobile Telegram app use. The documentation of the Telegram Bot API is here: https://core.telegram.org/bots/api. It does not indicate in any way that bots are able to use the emoji.
See also Telegram API Custom Emoji sending in message.

Is it possible to call external web APIs from Slack?

I want to pull some metrics daily posted in my slack channel. these metrics are located in my personal server, and to pull them via rest API a basic authentication is also required.
Does slack support this?in other words can slack do external api call in such way?
and if yes how?
To achieve this, you need to create a custom application(bot).
You can implement your custom business logic and then use slack APIs to post generated data to Slack Client.
https://slack.com/intl/en-in/help/articles/115005265703-Create-a-bot-for-your-workspace

How to notify user via telegram in spring boot app&

I have spring boot app which able to notify users via their emails about some events. In mentioned case app is using user email. I need same functionality for telegram - by user nickname or phone number my app have to notify user about event.
How to implement sush simple case?
I have already worked on a very large scale project. One of the requirements was to send notifications through various channels, including Telegram Messenger.
You can choose different ways to do this, The solution I can suggest to you is to use the APIs that Telegram itself has to communicate with the core.
I guarantee you that many of your needs will be met through these APIs.
I will share the link that helped me a lot before, I hope I could have helped you.
https://core.telegram.org/api
https://core.telegram.org/api/obtaining_api_id

Discord.py on authorization have a bot add someone to a server?

Is it possible to have a discord application be authorized specifically for the purpose of adding members to a server and then joining it for them?
You'll need the user to grant your application the guilds.join scope.
As described in the Discord API docs, you need a bot user already in the server for this (emphasis mine):
guilds.join and bot require you to have a bot account linked to your application. Also, in order to add a user to a guild, your bot has to already belong to that guild.
discord.py, however, does not have built-in support for this behaviour as far as I'm aware. You'll need to implement the OAuth2-Flow for yourself (Discord themselves have a Python example on their GitHub page that you can take inspiration from)

Calling an external API from MS Teams chat

Can anyone offer guidance on how to call an external API from within MS Teams chat/posts initiated by an #mention or #hastag? The service I want to build would use the mention/hastag to call an API and return various types of meta data that would then be added to the chat, post, etc. Wondering if Flow or Yo Teams is the best way to go.
The best approach for this would be to create a bot, which gets a name that can be '#' mentioned (e.g. if you bot is called MyBot, you could mention #MyBot in a Teams channel, and it will get notified). Once it receives the notification, the bot can do anything you need it to do.
If you have development skills available (yourself or someone on your team), have a look at the Teams Bot development documentation to get started. If not, Power Virtual Agents could suit your needs (it's like a "drag and drop" bot creator.

Resources