Please tell me there is a code
invite_link = await bot.create_chat_invite_link(update.chat.id)
creates, for everyone, a permanent invitation link, it is necessary that the user shares the invitation link and only then, as he subscribes, a new…
I am new to telegram bots developing, currently I am trying to make bot using aiogram and webhooks. Here my configuraton of domain:
server {
server_name my_server my_server;
add_header Access-Control-Allow-Origin *;
add_header…
Project (connection between DRF and bot with endpoints):
-bot-directory (not in django project) : services.py and main.py in it
-folders of django apps, manage.py etc.
My function from services.py from bot directory
def get_items_kb():
keyboard…
I have this project structure:
project-root
│
├── bot/
│ ├── __init__.py
│ └── main.py
│
└── venv/
├── run.py
init.py initializes the main.py file, but the run.py file does not see it and returns me following error:
Traceback (most recent…
How to call a regular function in a callback handler
there is a menu function:
async def menu(message: types.Message):
user_stat = db.get_user_stat(message.from_user.id)
await message.answer(f"Your ID: {user_stat[0]} Name:…
I need to check if a message sender is in a "special" list, to allow only special users to use some commands. I used IDFilter for it. But this "special" list may be changed, and I need these changes to be taken into account. But I found that…
i was making a gpt 3.5 integrated telegram bot and i wanted to edit texts with bot. I had tried for a long and it worked once. But it's not working now.
@dp.message_handler()
async def echo_msg(message: types.Message):
await message.reply("Hi")
…
I was writing a Telegram bot noticed that it doesn't respond to photos. This echo bot should copy every message (other than /start) and sendit back using message.send_copy(message.from_id). It works on simple text messages, but if I send a photo to…
I'm developing a Telegram bot for a store using the aiogram library in Python. My project requires two bots, namely the store bot and the courier-delivery bot for the store, to work together in the same application. I've tried various approaches,…
The code of the bot that responds to new vacancies on the site. I used the asynchronous version of schedule - aioschedule so that the function action was repeated every 3 minutes. However, after the first execution, an error occurs "AttributeError:…
The bot sends me a screenshot message with promo code activation, and 4 buttons are created under the message, namely 1-4, and each button executes its own script in Chromium, but for some reason the buttons are not working from…
I have the selenium parser, which clearly works on my own computer with no exceptions. However when im trying run it on my vps server i got the NoSuchElementException. Here is my code and the text of the problem:
def csgo_registration():
…
I wrote a bot to get photo charts in tradingview:
from aiogram.dispatcher import FSMContext
from aiogram.dispatcher.filters.state import State, StatesGroup
import sellbot
from aiogram.contrib.fsm_storage.memory import MemoryStorage
from aiogram…