컴퓨터/Game2016. 1. 4. 14:36


● MYBOT V5.0.2 # MOD TELEGRAM NOTIFICATION [REMOTE WITH CUSTOM KEYBOARD]

https://mybot.run/forums/thread-9854.html


How to take a Telegram token:
You should begin a chat with @botfather
Botfather is a bot and help you to made a bot and give you a token.
Instructions to take token:
Create a new bot

Use the /newbot command to create a new bot. The BotFather will ask you for a name and username, then generate an authorization token for your new bot.

Usernames are 5-32 characters long and are case insensitive, but may only include Latin characters, numbers, and underscores. Your bot's username must end in ‘bot’, e.g. ‘tetris_bot’ or ‘TetrisBot’.

The token is a string along the lines of 110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw that will be required to authorize the bot and send requests to the Bot API.

The remaining commands are pretty self-explanatory:

/setname – change your bot's name.
/setabouttext — changes the bot's about info, an even shorter text of up to 120 characters. Users will see this text on the bot's profile page. When they share your bot with someone, this text will be sent together with the link.
/setuserpic — changes the bot‘s profile pictures. It’s always nice to put a face to a name.

Please note, that it may take a few minutes for changes to take effect.


-------------------------------------------------------------------------------------------------------------------------------------
For more info please see https://core.telegram.org/bots
-------------------------------------------------------------------------------------------------------------------------------------


Instruction:
Insert your Telegram Bot token in token2 field. 
If using your Telegram Bot for first time, you should send any text like " test " , " hi " and etc. This make your chat_id used in mod. Then run MyBot windows program and wait to receive village report, then send /start and wait to receive keyboard.


Phone app screenshot:                                                                         Screen shot of the change in notification tab:

[Image: nAdIJTE.jpg] [Image: DzqnXvS.jpg]






● 텔레그램 로봇, 공식 API로 만들기


1. @BotFather를 통한 봇 등록 / 토큰 발급

텔레그램 봇은 @BotFather 봇을 통해 관리된다.

텔레그램 클라이언트에서 @botfather 사용자를 채팅 목록에 추가한다.
텔레그램 클라이언트에서@BotFather를 검색하거나
웹 브라우저에서 https://telegram.me/botfather 주소로 접속해도@BotFather 사용자를 추가할 수 있다.

@BotFather 사용자를 채팅 목록에 추가하면 아래와 같은 화면이 나온다.

BotFather 채팅 화면

START를 누른 후 @BotFather에게 /help 메시지를 보내면 사용가능한 명령어를 알려준다.
명령어에 대한 자세한 설명은 텔레그램 봇 API 문서에 있다.

/newbot

@BotFather에게 /newbot 메시지를 보내면 봇을 등록할 수 있다.

봇을 만드는 과정은 아래와 같다.

  1. /newbot 메시지를 보낸다.

  2. 봇의 이름을 입력한다. 한글도 쓸 수 있다. 예) 시험용 로봇

  3. 봇의 아이디를 입력한다. 한글은 쓸 수 없으며, 반드시 bot, Bot 등으로 끝나야 한다. 예)my_testing_bot

  4. @BotFather가 봇이 생성되었다고 알려주며 봇 주소와 토큰을 알려준다.
    토큰은 봇 API를 사용하기 위해 꼭 필요하므로 잘 챙겨두고, 유출되지 않도록 한다.

BotFather newbot 명령 1

BotFather newbot 명령 2





● 텔레그램 채널에 봇(bot)으로 자동 포스팅하기


1. 텔레그램 봇 만들기

봇파더(@Botfather)를 통해 만들면 됩니다.

  1. 친구초대 방식으로 채팅방에 입장하여
  2. /help 치면 명령어가 정리되어 나옵니다.
  3. /newbot 명령어로 새 봇을 만들겠다고 선언하고
  4. name을 정해달라고 물어오면, “이것저것링크” 등과 같이 이름을 정해줍니다.
  5. username을 물어보면 영문과 숫자를 사용하여 정해줍니다. 단, 끝문자는 bot으로 끝나냐 합니다.
    저는 “ththlink_Bot” 이라고 적었네요. _ 
  6. 그럼 token이라면서 복잡한 문자열을 알려주는데, 잘 메모해두도록 합니다.
    채팅방 바깥에서 이 봇에게 명령을 내리려면 반드시 필요합니다.



Posted by 아침의눈물