#๐Ÿ”’ the problem with re-adding users

21 messages ยท Page 1 of 1 (latest)

lament marlin
#

I have a telegram bot user who adds users, but every time he tries to add the same user again and gives the error I have a user sorting, users.txt a list of all users, not_added_users.txt not added and added_users added

atomic tangleBOT
#

@lament marlin

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

lament marlin
fresh lagoon
#

Why not sqlite?

#

If it were a proper database (at least in sqlite), you can restrict duplicates

lament marlin
#

Isn't that an extra burden?

#

I did work with the mysql database, but it repeats everything exactly to the users

#

I replaced the code with the base code that I tried to use

fresh lagoon
#

idk if you've designed the table to restrict on unique users

fresh lagoon
#

you've set them as unique?

#

If so, it should be fine

#

That should work

#

Sorry but I gtg

#

Good luck!

lament marlin
#

thx

atomic tangleBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.