# Getting Started

Before we can start you’ll need to install [Python](https://www.python.org/downloads/) + [PyCharm Community Edition](https://www.jetbrains.com/pycharm/download/). It’ll help point out any errors in your script and offer useful suggestions for your code. A zip archive with all the project files can be found [here](https://github.com/as-helios/affection-bots/archive/refs/heads/main.zip).

## 1. Install Python

### Linux

* Debian/Ubuntu: `sudo apt install python3`
* Arch: `sudo pacman -S python3`
* RHEL: `sudo yum install -y python3`

### macOS

* Download: <https://www.python.org/ftp/python/3.12.4/python-3.12.4-macos11.pkg> ([Source](https://www.python.org/downloads/macos/))

{% hint style="danger" %}
You’ll also need to install the [**certifi**](https://pypi.org/project/certifi/) package afterwards to handle SSL connections to the RPC servers.
{% endhint %}

### Windows

* Download: <https://www.python.org/ftp/python/3.12.4/python-3.12.4-amd64.exe> ([Source](https://www.python.org/downloads/windows/))

{% hint style="danger" %}
You will also need [Microsoft C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/). Install “Desktop development with C++” which takes up about 6.42 GB.
{% endhint %}

![](https://724266576-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvpQTLAHrVaPSs8HZzOYQ%2Fuploads%2F7PrZUpVuLyO5psoJTf8Z%2Fimage.png?alt=media)

{% hint style="danger" %}
Windows also needs UTF-8 enabled because 414 likes to use weird characters for token names/symbols.
{% endhint %}

![](https://724266576-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvpQTLAHrVaPSs8HZzOYQ%2Fuploads%2FrNq9VG5a5YsTDOJi06fq%2F2024%2007%2005_18%2029.png?alt=media)

![](https://724266576-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvpQTLAHrVaPSs8HZzOYQ%2Fuploads%2FC13OdkvfLUcoc208nZuh%2F2024%2007%2005_18%2030.png?alt=media)

![](https://724266576-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvpQTLAHrVaPSs8HZzOYQ%2Fuploads%2FwYEje8rcZFaaYcNzwlCD%2F2024%2007%2005_18%2031.png?alt=media)

![](https://724266576-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvpQTLAHrVaPSs8HZzOYQ%2Fuploads%2FLMCWfNKVOvBhueulzQm4%2F2024%2007%2005_18%2032.png?alt=media)

## 2. Install PyCharm Community Edition

Go to <https://www.jetbrains.com/pycharm/download/> and scroll down. Download the **Community Edition**.

![](https://724266576-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvpQTLAHrVaPSs8HZzOYQ%2Fuploads%2F63Lfm05DZmuZ7wOukafB%2F2024%2007%2003_10%2024.png?alt=media)

{% hint style="danger" %}
Make sure you get the free **Community Edition**!
{% endhint %}

It will should detect the correct operating system for you, or you can click one of these links:

* [Linux](https://www.jetbrains.com/pycharm/download/?section=linux)
* [macOS](https://www.jetbrains.com/pycharm/download/?section=mac)
* [Windows](https://www.jetbrains.com/pycharm/download/?section=windows)

Install and run it, accept any terms/user agreements. Your main screen should look like this:

![](https://724266576-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvpQTLAHrVaPSs8HZzOYQ%2Fuploads%2FXBGv3ESTYputwe9nogru%2Fimage.png?alt=media)

## 3. Creating your first project

Let’s name this one “affection-bots”.

![](https://724266576-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvpQTLAHrVaPSs8HZzOYQ%2Fuploads%2FBphr5WeeRUTAVmoJaBAq%2Fimage.png?alt=media)

Your project folder will look like this. It contains some default files inside “.venv” which PyCharm uses. You can collapse that folder and ignore it from now on.

![](https://724266576-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvpQTLAHrVaPSs8HZzOYQ%2Fuploads%2FnyH3fGqnjRFRqPL4FzxR%2Fimage.png?alt=media)

I’ve included a [zip archive with some files to get started](https://github.com/as-helios/affection-bots/archive/refs/heads/main.zip). Extract the contents into your project folder.

![](https://724266576-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvpQTLAHrVaPSs8HZzOYQ%2Fuploads%2F25V9EMjdOFL5cLfaZr9M%2Fimage.png?alt=media)

## 4. Install packages

Click this button in the bottom left to open the Terminal panel.

![](https://724266576-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvpQTLAHrVaPSs8HZzOYQ%2Fuploads%2FR1qCWosIuwAwXGvLrY7B%2Fimage.png?alt=media)

Type this to install a few packages we’ll be using:

```javascript
pip install -r requirements.txt
```

Give it a few seconds and it should complete without errors.

![](https://724266576-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvpQTLAHrVaPSs8HZzOYQ%2Fuploads%2FAcfBnfSWHJgkwnd1Nrx6%2Fimage.png?alt=media)

Now we can start cooking. In the [next section](https://affection.gitbook.io/docs/bots-and-scripts/core-functions) we’ll look at what functions I’ve included for you to use.


---

# 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://affection.gitbook.io/docs/bots-and-scripts/getting-started.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.
