Im making a discord bot currently and i was wondering on how to randomise messages on discord.js
the normal way
e.x.
const reply = ["reply1", "reply2"]
const choose_reply = [Math.floor(Math.random() * reply.length)];
console.log(choose_reply);
this works in the console but it doesnt work...
So im working on a text game in python and I first decided to use the time module:
import time
print("Hello")
time.sleep(2)
print("How are you")
But now i am creating a function and putting it in place of the time module like this:
def dialog():
dialog = input("")
print("Hi")
dialog()...
Hi for a project im working on i was wondering is there anyway you could run a python file inside a python file say for instance
choice = input(">")
if choice == "run"
# run a external python file
if anyone can tell me a way to run a python file inside one that would be helpful
Thanks
Hi I have started working on a tcp chat room, the client is working perfectly fine but im getting an error with the server itself.
This is the error code
File "mu_code/chatapp.py", line 33
broadcast(f'{nickname} left the chat'.encode('ascii'))
^...