UNPKG
telegram-bot-api
Version:
beta (2.0.0-beta.1)
latest (2.0.1)
2.0.1
2.0.0
2.0.0-beta.1
1.3.4
1.3.3
1.3.2
1.3.1
1.3.0
1.2.2
1.2.1
1.2.0
1.1.0
1.0.0
0.3.2
0.3.1
0.3.0
0.2.0
0.1.0
First Telegram Bot API node.js library
github.com/mast/telegram-bot-api
mast/telegram-bot-api
telegram-bot-api
/
examples
/
getme.js
15 lines
(11 loc)
•
267 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const
TG
=
require
(
'../lib/index'
)
const
BOT_TOKEN
= process.
env
.
BOT_TOKEN
if
(!
BOT_TOKEN
) {
console
.
log
(
'Opps, you need to define your BOT_TOKEN'
) }
const
api =
new
TG
({
token
:
BOT_TOKEN
}) api.
getMe
() .
then
(
console
.
log
) .
catch
(
console
.
err
)