All Chat! -A Python Chat (Now Version 3.5)
This is a chat in
We have ran out of slots for mods. Sorry
If There's An Error
We are undergoing some changes.
Inspiration - @JBloves27
- Blocks Swearing
- Moderator Confirmation
- See Old Chats
- New colors
If you like this, you may like our Text 2 ASCII program!
Dont cuss, say slurs, harass people, and advertise.
No NSFW. This is not for NSFW.
No impersonating Moderators/Developers/Owners.
Don't say any personal info.
We care for the safety of our users."
And if you need Moderators Feel free to call for some.
All Chat Inc. Copyright Reserved.
'underline' for markdown!
'ASCII' for ASCII art!
'quit' to leave
'change_name' to change your username
'old_messages' to see old messages
'feedback' to rate the chat
Dear Users, remember to NOT swear, keep it friendly!
Ping us if you need our help with something
Everyone, go to here for the chat to work!
Firstly, you are saving all the chat into a text file. That is the worst choice of saving data you could probably think of. Anyone can wipe all the data clean in a second.
The chat also doesn't update, you have to hard reload to see the new chat because it is getting saved in the text file, and most if the time it doesn't. I triedd from a different laptop, nothing changed. An actual chat works live and constant updating chat. You writing into the text file destroys the point completely. This (no offense) is almost low effort.
I express no hate or offense, I am just saying how this can be much better and how the description is biased.
This feels like a somewhat cheap way to create a python chatroom. The fact that your re-writing a text file and printing it defeats the whole purpose, considering that a chat is a way to connect multiple clients to a server and have them message each other.
Internet Relay Chat (IRC) is an application layer protocol that facilitates communication in the form of text. The chat process works on a client/server networking model. IRC clients are computer programs that users can install on their system or web based applications running either locally in the browser or on a third party server.
Also, judging based on the code, the moderators are completely fake and have no powers/abilities within the chatroom.
@IMayBeMe I don't think I am incompetent. (Sorry @JWZ6) I managed to disable ctrl-c and make it so whenever you do it, this happens:
os.system('clear'). I also made sure that the program never exits. I found alternative ways to that. If there is any other way to wipe out the text file please let me know
@SamiOsman I think the easiest way to fix it would be to save every message to a data base string and use beeline characters to split it something like this:
from replit import db db[‘some_key’] = ‘test message\n’ db[‘some_key’] += ‘next message\n’ print(db[‘some_key’])
you can replace
some_key with your own which can then be stored in the env section. Also this is just a rough overview so you can add your own input and adding stuff to the db
one ting: I can choose I am a moderator, choose a username and log in as a moderator. You should have at least a secret passwrd using replit’s secret code feature thing. or something more secure.
It seems like you used some code from my template, which is cool, but I have some things to mention.
This does not actually save, as the
.txt file does not work as db (I'll put that on the template). To actually save, you might want to import db things, etc.
Also, you might want to print the chat text in the console, or make this a flask app with db.
new update! Ascii text.
If you type something in then this will appear Traceback (most recent call last):
File "main.py", line 60, in <module>
TypeError: write() argument must be str, not None
please opy and paste and enter the chat until we fix that bug.