Install MZscript
- Open the vscode and add the folder with the bot
- Open Terminal (Ctrl+Shift+`)
- Install MZscript
pip install MZscript
Start Bot
- Create file
main.py
This is your main file, from it you will launch the bot
- We write the code that launches the bot
from MZscript import MZClient # Let's import the class
bot = MZClient() # Create a bot object
bot.add_command( # Create command
name='!help', # Name command
code='''
$sendMessage[Hi!]
'''
)
bot.run('Token bot') # Launch bot
The most important thing is not to show the bot token to anyone because another person will be able to access your bot
- How to launch a bot?
- Method 1:
You are installing the VS Code extension for Python. Tap. And then in the top right corner, click start.
- Method 2:
Open the terminal and write the command:
python main.py