Просмотр полной версии : баг какой то с ботом тг
запускаю, показывает одну проблему, не понимаю, я новичок в этом
https://forum.antichat.xyz/attachments/28485615/img_5bd7a77500.png
https://forum.antichat.xyz/attachments/28485615/img_b82bdfb889.png
vlaDICK2288
19.04.2024, 21:22
запускаю, показывает одну проблему, не понимаю, я новичок в этом
Отступ сделай
можешь помочь, чтобы он писал только ник, без None, и если не сложно добавить меню чтобы меню такая же, и плашки с инфой
https://forum.antichat.xyz/attachments/28485619/img_5b3d90b3d1.png
https://forum.antichat.xyz/attachments/28485619/img_6e48318e80.png
vlaDICK2288
19.04.2024, 21:30
код кинь вот так:
python:
sd
dasd
sad
asd:
import
telebot
botTimeWeb
=
telebot
.
TeleBot
(
'6830548762:AAEwhwDqk4DPskbXCHgp8fI_FuhGbKbwPFI'
)
from
telebot
import
types
@botTimeWeb.message_handler
(
commands
=
[
'start'
]
)
def
startBot
(
message
)
:
first_mess
=
f"{message.from_user.first_name}{message.from_user.l ast_name}, привет!Хочешь расскажу немного о нашей компании?"
markup
=
types
.
InlineKeyboardMarkup
(
)
button_yes
=
types
.
InlineKeyboardButton
(
text
=
'Да'
,
callback_data
=
'yes'
)
markup
.
add
(
button_yes
)
botTimeWeb
.
send_message
(
message
.
chat
.
id
,
first_mess
,
parse_mode
=
'html'
,
reply_markup
=
markup
)
@botTimeWeb.callback_query_handler
(
func
=
lambda
call
:
True
)
def
response
(
function_call
)
:
if
function_call
.
message
:
if
function_call
.
data
==
"yes"
:
second_mess
=
"Мы облачная платформа для разработчиков и бизнеса. Более детально можешь ознакомиться с нами на нашем сайте!"
markup
=
types
.
InlineKeyboardMarkup
(
)
markup
.
add
(
types
.
InlineKeyboardButton
(
"Перейти в наш оффициальный телеграм канал"
,
url
=
"https://t.me/brandshopnsk"
)
)
botTimeWeb
.
send_message
(
function_call
.
message
.
chat
.
id
,
second_mess
,
reply_markup
=
markup
)
botTimeWeb
.
answer_callback_query
(
function_call
.
id
)
botTimeWeb
.
infinity_polling
(
)
vlaDICK2288
19.04.2024, 21:35
asd:
import
telebot
botTimeWeb
=
telebot
.
TeleBot
(
'6830548762:AAEwhwDqk4DPskbXCHgp8fI_FuhGbKbwPFI'
)
from
telebot
import
types
@botTimeWeb.message_handler
(
commands
=
[
'start'
]
)
def
startBot
(
message
)
:
first_mess
=
f"{message.from_user.first_name}{message.from_user.l ast_name}, привет!Хочешь расскажу немного о нашей компании?"
markup
=
types
.
InlineKeyboardMarkup
(
)
button_yes
=
types
.
InlineKeyboardButton
(
text
=
'Да'
,
callback_data
=
'yes'
)
markup
.
add
(
button_yes
)
botTimeWeb
.
send_message
(
message
.
chat
.
id
,
first_mess
,
parse_mode
=
'html'
,
reply_markup
=
markup
)
@botTimeWeb.callback_query_handler
(
func
=
lambda
call
:
True
)
def
response
(
function_call
)
:
if
function_call
.
message
:
if
function_call
.
data
==
"yes"
:
second_mess
=
"Мы облачная платформа для разработчиков и бизнеса. Более детально можешь ознакомиться с нами на нашем сайте!"
markup
=
types
.
InlineKeyboardMarkup
(
)
markup
.
add
(
types
.
InlineKeyboardButton
(
"Перейти в наш оффициальный телеграм канал"
,
url
=
"https://t.me/brandshopnsk"
)
)
botTimeWeb
.
send_message
(
function_call
.
message
.
chat
.
id
,
second_mess
,
reply_markup
=
markup
)
botTimeWeb
.
answer_callback_query
(
function_call
.
id
)
botTimeWeb
.
infinity_polling
(
)
тебе нужно юзернейм? или имя и фамилию?
тебе нужно юзернейм? или имя и фамилию?
имя и фамилию
Python:
components
=
[
message
.
from_user
.
first_name
,
message
.
from_user
.
last_name
]
form
=
""
.
join
(
component
for
component
in
components
if
component
)
form
+=
", привет! Хочешь расскажу немного о нашей компании?"
print
(
form
)
https://forum.antichat.xyz/attachments/28485631/img_20bb6b3a7c.png
Токен поменяй, ибо твоему боту сломают жопу
vBulletin® v3.8.14, Copyright ©2000-2026, vBulletin Solutions, Inc. Перевод: zCarot