# Installation

### Schritt 1: Laden der Bot Dateien

1. Lade dir alle Bot Dateien in unserem Panel herunter
2. Entpacke die .zip Datei und füge alle Dateien (config.py, start.py, main.myst) in einen Ordner auf deinen Server ein.

{% hint style="warning" %}
Empfohlen in /home/DEINORDNER
{% endhint %}

3. Trage in der config.py deinen Bot Token und deinen License Key ein.

### Schritt 2: Installation der Vorrausetzungen

{% hint style="warning" %}
Installationsanleitung ist derzeit nur für **Debian**
{% endhint %}

1. Stelle eine SSH Verbindung mit deinem Server her.
2. Überprüfe ob Python installiert ist.

```bash
python3 -V
```

3. Wenn Python installiert ist mache weiter, wenn nicht dann gehe zu Schritt Python installieren.
4. Überprüfe ob PIP installiert ist.

```bash
pip3 -V
```

5. Wenn PIP installiert ist mache weiter, wenn nicht dann gehe zu Schritt PIP installieren.

### Schritt 3: Installation der PIP Modulen

1. Gebe diesen Befehl ein

```bash
python3 -m pip install Subdora --break-system-packages
```

2. Es sollte ein Download Verlauf sichtbar sein.

### Schritt 4: Bot starten und 24/7 erreichbar machen

1. Gebe folgenden Befehl ein

```bash
screen -S dcbot
```

2. Der Name "dcbot" kann selbst festgelegt werden
3. Gebe dann folgenden Befehl ein

```bash
cd /home/DEINORDNER
```

4. Jetzt bist du in deinem Verzeichnis wo deine Bot Dateien drinnen liegen.
5. Führe folgenden Befehl aus

```bash
python3 start.py
```

{% hint style="warning" %}
Beim ersten starten des Bots dauert es immer länger, weil er alle restlichen Module installiert werden
{% endhint %}

6. Jetzt ist dein Bot online!

{% hint style="warning" %}
WICHTIG: Um aus den Screen sicher rauszugehen benutze den Shortkey STRG + A +D . Der Screen friert sonst ein, und man kann nicht mehr drauf zugreifen.
{% endhint %}

### Python3 Installieren

{% hint style="info" %}
Sollten Fehler auftreten wende dich an den Support!
{% endhint %}

```bash
sudo apt update
sudo apt install -y build-essential zlib1g-dev libncurses5-dev \
libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev \
libsqlite3-dev wget libbz2-dev liblzma-dev tk-dev
```

```python
cd /tmp
wget https://www.python.org/ftp/python/3.13.0/Python-3.13.0.tgz
```

```bash
tar -xf Python-3.13.0.tgz
cd Python-3.13.0
```

```bash
./configure --enable-optimizations --with-ensurepip=install

make -j$(nproc)

sudo make altinstall
```

### PIP3 Installieren

{% hint style="info" %}
Sollten Fehler auftreten wende dich an den Support!
{% endhint %}

{% hint style="warning" %}
Python muss davor installiert sein!
{% endhint %}

```bash
sudo apt install python3-pip
```

```bash
pip3 --version
```

### Auf Screen zugreifen

Wenn du auf deinen Screen zugreifen willst um einen lokalen Neustart einzuleiten gehe wie folgt vor.

```bash
screen -r dcbot
```

Der Name "dcbot" variert je nach dem welchen Namen du gewählt hast.

Du bist jetzt im Screen, mit STRG + C kannst du den Bot stoppen und über den Befehl

```bash
python3 start.py
```

starten.

{% hint style="warning" %}
WICHTIG: Um aus den Screen sicher rauszugehen benutze den Shortkey STRG + A +D . Der Screen friert sonst ein, und man kann nicht mehr drauf zugreifen.
{% endhint %}

### Fehlerbehebung:

#### Version 'GLIBCXX\_3.4.29' not found

```bash
Traceback (most recent call last):
  File "/root/discord-bot2/start.py", line 1, in <module>
    import Subdora
  File "/usr/local/lib/python3.13/site-packages/Subdora/init.py", line 1, in <module>
    from ._subdora import subdora_encode_file , subdora_parse , subdora_encode_to_image ,  subdora_parse_img
  File "/usr/local/lib/python3.13/site-packages/Subdora/_subdora.py", line 30, in <module>
    subdora_core = ctypes.CDLL(path)
  File "/usr/local/lib/python3.13/ctypes/init.py", line 390, in init
    self._handle = _dlopen(self._name, mode)
                   ~~~^^^^^^^^^^^^^^^^^^
OSError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/local/lib/python3.13/site-packages/Subdora/corex64/linux/Subdora.so)
```

Der Fehler tritt meistens bei Debian 10 auf, weil Debian 10 zu veraltet ist.

```bash
# Debian 12 Repository hinzufügen
echo "deb http://deb.debian.org/debian bookworm main" | sudo tee /etc/apt/sources.list.d/bookworm.list

# Aktualisieren
sudo apt update

# libstdc++6 von Bookworm installieren
sudo apt install -y libstdc++6

# Repository wieder entfernen
sudo rm /etc/apt/sources.list.d/bookworm.list
sudo apt update

# Version prüfen
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX | tail -5
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wavecore.dev/wavecore/discord-bots/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
