Removed user class

This commit is contained in:
Florian Kellermann 2022-04-26 10:34:17 +02:00
parent 9e344c4f9a
commit 275444fb95

View File

@ -41,31 +41,6 @@ bot_version = "1.0.1" # version of bot
api_handler = API_Handler("https://gruppe1.testsites.info/api", str(os.getenv("BOT_EMAIL")), str(os.getenv("BOT_PASSWORD"))) # get creds from env vars. api_handler = API_Handler("https://gruppe1.testsites.info/api", str(os.getenv("BOT_EMAIL")), str(os.getenv("BOT_PASSWORD"))) # get creds from env vars.
print("Webserver Token: " + str(api_handler.token)) print("Webserver Token: " + str(api_handler.token))
class User: # Currently saving users in this class to test functionality -> later database REMOVABLE
def __init__(self, p_user_id, p_user_name, p_chat_id):
""" Initialize a new user
:type self: User
:param self: object of the class
:type p_user_id: int
:param p_user_id: telegram user id
:type p_user_name: str
:param p_user_name: first name of user
:type p_chat_id: int
:param p_chat_id: telegram chat id
:raises:
:rtype:
"""
self.user_id = int(p_user_id)
self.chat_id = int(p_chat_id)
self.user_name = str(p_user_name)
bot = telebot.TeleBot(os.getenv('BOT_API_KEY')) bot = telebot.TeleBot(os.getenv('BOT_API_KEY'))
@bot.message_handler(commands=['start', 'Start']) # /start -> saving as new user and sending welcome @bot.message_handler(commands=['start', 'Start']) # /start -> saving as new user and sending welcome