A bot that remembers things, such as levels, warnings or settings per server, needs somewhere to keep them. Your bot plan includes one database. You can also use a file such as SQLite, which needs no setup but is harder to share between two bots.
Create the database
Open your server in the panel and click Databases in the left menu.
Click New database, choose the type, add a label such as bot-data and click Create database.
async function main() { await pool.query('CREATE TABLE IF NOT EXISTS warnings (id INT AUTO_INCREMENT PRIMARY KEY, user_id VARCHAR(32), reason TEXT)'); const [rows] = await pool.query('SELECT COUNT(*) AS n FROM warnings'); console.log('warnings stored:', rows[0].n); } main(); ```
Python (aiomysql)
Add aiomysql and python-dotenv to requirements.txt, then:
```python import os import aiomysql from dotenv import load_dotenv