kmint21 / telegram-sport-event-bot Goto Github PK
View Code? Open in Web Editor NEWTelegram Bot for organizing sport or any other events for small groups
Telegram Bot for organizing sport or any other events for small groups
I've used python-telegram-bot==13.5
https://github.com/KMiNT21/telegram-sport-event-bot/blob/master/sport_event_bot.py#L373
In this line I had error
`
File "/home/bot/telegram-sport-event-bot/sport_event_bot.py", line 373, in penalty_player
db.penalty_for_user_in_chat(chat_id=update.message.chat_id, user_id=user_id, operator_id=update.message.from_user.user_id)
│ │ │ │ │ │ │ │ └ <telegram.user.User objec
t at 0xffff9bef6fa0>
│ │ │ │ │ │ │ └ <telegram.message.Message object
at 0xffff9bef6e80>
│ │ │ │ │ │ └ <telegram.update.Update object at 0xff
ff9bef6b80>
│ │ │ │ │ └ '542117150'
│ │ │ │ └ <property object at 0xffff9c97f680>
│ │ │ └ <telegram.message.Message object at 0xffff9bef6e80>
│ │ └ <telegram.update.Update object at 0xffff9bef6b80>
│ └ <function penalty_for_user_in_chat at 0xffff9c0a1280>
└ <module 'db' from '/home/bot/telegram-sport-event-bot/db.py'>
AttributeError: 'User' object has no attribute 'user_id'
`
probably it would be better to change update.message.from_user.user_id
to update.message.from_user.id
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.