电报

telegram bot sendMessage 发送消息

萝らか妹 提交于 2020-02-07 07:36:12
本文内容来自以下官方文档 Bots: An introduction for developers Telegram Bot API Creating a new bot Telegram 添加 BotFather 进入聊天界面 点击输入框中 /start 回复内容中点击 /newbot 阅读提示分别输入 name 和 username 紧接着回复内容中包含了接下来需要使用的 token,看起来像这样:123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11 以上步骤可同步参考 官方文档:Creating a new bot sendMessage curl 'https://api.telegram.org/bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11/getMe' 以上命令请参考 官方文档:getMe curl -d 'chat_id=700049303&text=hello' 'https://api.telegram.org/bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11/sendMessage' 以上命令请参考 官方文档:sendMessage 此时你可能会疑惑,你的 chat_id 哪里来的?与 Bot 发起私聊,在群聊里添加 Bot,之后均可以通过

Telegram之导入项目、初步认识

萝らか妹 提交于 2020-01-27 03:49:32
1、下载源码、导入Android studio中调试并运行成功 从在github 上找到源码,到调试成功,Telegram能够被安装到手机上运行,前前后后花了起码四五天!调试过程中遇到了很多问题,特此记录! 正确步骤: 通过github克隆源码。地址: Telegram 源码 。按照网址上要求下载Android studio 3.4及以上版本、NDK20、SDK8.1,避免出错误。下图是克隆过程,当然也可以通过git 命令行进行操作。 遇到的问题:克隆失败,多克隆几次,用了git 的图形界面版,最终成功。 可能是网络问题。也可以不用git 克隆直接下载压缩包,使用Android studio 打开文件夹。 生成release.keystore 放置在项目目录下(Telegram\TMessagesProj\config)。这是因为从github 上克隆时,会少克一些配置文件,所以要自己生成。对于如何生成release.keystore文件,可以看 这个 。key store path可以直接选择上面的路径。名称写为release.keystore。(key store password、alias、key password记好,等下要填写到gradle.properties中) 注:生成的keystore 文件后缀名为.jks ,需要重命名为release.keystore

摩斯电码/密码入门简介

↘锁芯ラ 提交于 2019-12-08 08:55:44
摩尔斯:是我们生活中非常常见的一种密码形式,例如电报就用的是这个哦 什么是摩尔斯电码: 摩斯电码是一种用于交流的系统,由塞缪尔•莫尔斯发明,它依靠一系列的点和划来传递编码信息。虽然,最初它被设计为一种通过电报线进行通信的方式,但直到今天,业余无线电爱好者仍然使用着摩斯电码,而且它也可以用于在紧急情况下发送求救信号。尽管摩斯电码并不难学,但也需要像学习其他语言一样进行研究,并付出努力。不过,一旦你掌握了基本信号的含义,就可以开始编写和翻译你自己的信息了 1.知道基本信号的含义 摩斯电码由两种不同的信号单位组成:点和划。你的第一个目标是要学会辨认出现在文本中的这些单位。点看起来像是句号,而划是长的水平线段,像是破折号。英语中的每一个字母都可以用这两种符号表示出来。 在摩斯电码的官方术语,点通常读作“滴”。 划通常读作“嗒”。 “滴”是发短促的单音节音,“哒”的音则相对较长,应该是“滴”持续时间的三倍长。 摩斯电码就是通过这种快速或缓慢的节奏来区分每个信号的。 它由两种基本信号和不同的间隔时间组成:短促的点信号" .",读" 的 "(Di); 保持一定时间的长信号"—",读"答 "(Da)。[]间隔时间:滴,1t;答,3t;滴答间,1t; 字母间,3t;字间,5t。 1、一点为一基本信号单位,一划的长度=3点的长度。 2、在一个字母或数字内,各点、划之间的间隔应为两点的长度。 3、字母

Telegram (Telesharp) - Massive requests (discuss about flood prevention limit)

匿名 (未验证) 提交于 2019-12-03 09:05:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: (I'm using TLSharp for connect to Telegram Service) I want search 400,000 channels, so call service SearchUserAsync for 400,000 times. I call this service every 15 seconds, but I get flood prevention for 1 day (~70000 seconds). What's best way for Call telegram services for n times? 文章来源: Telegram (Telesharp) - Massive requests (discuss about flood prevention limit)

Telegram API vs Bot API [closed]

匿名 (未验证) 提交于 2019-12-03 08:48:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Can you help me understand the differences for Telegram API vs Bot API please, I tried telegram website but just get confused? Thanks Ramin 回答1: Telegram APIs This API allows you to build your own customized Telegram clients. It is 100% open for all developers who wish to create Telegram applications on our platform. Feel free to study the open source code of existing Telegram applications for examples of how things work here. Don't forget to register your application in our system. Bot API This API allows you to connect bots to our system.

Telegram bot weird error : Bad Request: wrong file identifier/HTTP URL specified

匿名 (未验证) 提交于 2019-12-03 08:42:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am sending message to telegram channel using bot. With using webhook method. I'm sending file_id via the link. I got the file_id from a channel post. For some files like GIF & video format (MP4), when i use this code: $url = 'https://api.telegram.org/bot'.token.'/sendVideo?chat_id='.uid."&video=".$file."&caption=" .urlencode($caption); file_get_contents($url); i get such this error : {"ok":false,"error_code":400,"description":"Bad Request: wrong file identifier/HTTP URL specified"} I really don't know why i get this, It's like this is

NDK Error occured while importing telegram source code from github

匿名 (未验证) 提交于 2019-12-03 02:50:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I downloaded telegram open source code for android from the following the link https://github.com/DrKLO/Telegram . While importing the project am getting the following errors: External Native Build Issues Build command failed. Error while executing process C:\Users\user\AppData\Local\Android\sdk\ndk -bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\user\AndroidStudioProjects\Telegram-master\TMessagesProj\jni\Android.mk NDK_APPLICATION_MK=C:\Users\user\AndroidStudioProjects\Telegram-master\TMessagesProj\jni

Open telegram channel in android

匿名 (未验证) 提交于 2019-12-03 02:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In my app want to use Intent to open specific telegram channel or telegram group. i search in SF but i can't find anything.i try to implement but i only can open all messenger apps that user can choose but not telegram or specific telegram group or channel. if find this on sf but it's not answer to my question. Intent myIntent = new Intent(Intent.ACTION_SEND); myIntent.setType("text/plain"); myIntent.setPackage(appName); myIntent.putExtra(Intent.EXTRA_TEXT, msg);// mUIActivity.startActivity(Intent.createChooser(myIntent, "Share with")); 回答1:

Range selector / range seekbar to trim video including thumbnails

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am looking for a library or open source project that provides UI for trimming videos as you see in the screenshot. Including Range selector with ability to increase, decrease and move the selection Thumbnails Current position of playback Just the UI not the trimming itself. If there is no ready solution available, then I'd like to now how to combine existing UI elements in a smart manner to achieve this or something similiar. Here is what I finally implemented: Range selector / range seekbar to trim video including thumbnails 回答1

Using Telegram API for Java Desktop App?

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am not that new to Java Programming, but I have never worked with external libraries etc. Now I want to develop a desktop client for the "Telegram" open-source messaging platform, and I'm stuck when it comes to API-Usage. There is pretty much documentation about the Telegram API, found at https://core.telegram.org/api , and I've already downloaded mtproto, telegram-api and tl-core from github, and compiled my own library jar from source by using gradle. As well, I've already written a small application, where the user clicks a