# Old Pycord Guide

{% hint style="danger" %}
This guide has been moved to <https://namantech.me/pycord>. Please visit the new guide instead, since this one might be outdated.

The new guide looks better, has better explanations, and is way better overall.
{% endhint %}

Pycord is an API wrapper for the Discord API, which allows you to make Discord Bots. This is an unofficial guide to this Python Wrapper.

## Installation

### Fresh Start

{% hint style="success" %}

#### Installation

Remember that you need to install `py-cord`, not `pycord`.

```bash
pip install py-cord
```

{% endhint %}

### Migrating

1. Uninstall Discord and Discord.py libraries which you might have installed. These may mess up the imports, since Pycord's imports are the same.

   ```
   python -m pip uninstall discord.py -y
   ```

   ```
   python -m pip uninstall discord -y
   ```

2. Install Py-cord. Remember - its py-cord, not pycord.

   ```
   python -m pip install py-cord
   ```

### Other Builds

You can also install other builds if you want.

{% tabs %}
{% tab title="Alpha" %}
Warning: Py-cord alpha can be unstable

```bash
python -m pip install -U git+https://github.com/Pycord-Development/pycord
```

{% endtab %}

{% tab title="Slash Branch" %}
Note: Slash branch is usually very unstable. It is the branch where the devs are constantly working on.

```bash
python -m pip install git+https://github.com/Pycord-Development/pycord@slash
```

{% endtab %}
{% endtabs %}

Note: Git is required to install these. Visit the page below to understand how you can install git.

{% content-ref url="more/git" %}
[git](https://brucecodes.gitbook.io/pycord/more/git)
{% endcontent-ref %}

### Installation on repl.it

{% hint style="warning" %}
Repl.it is not a good IDE. Its online, its free, but you should definitely not use it to host your bot, its not made for that purpose. Your bot will get slower as it gets bigger, and certain files might be deleted.

Instead, you may use [EpikHost](https://epikhost.xyz). EpikHost is fully free for Discord Bots, you just need to join their [Discord Server](https://discord.gg/hosts) to create an account. You may also use another cheap VPS.&#x20;
{% endhint %}

Step 1: Create a file and name it `.replit`. Just `.replit`, with the dot/period at first.

Next, you need to insert the following into the file.

{% code title=".replit" %}

```
language="python3"
run = """
pip install py-cord
python main.py
"""

[packager]
ignoredPackages=["discord.py", "discord"]
```

{% endcode %}

{% hint style="info" %}
You may need to change a few things according to your needs, for example, the filename or the installation command (pip install py-cord).

Also, you do not need to install py-cord everytime Repl.it installs other libraries automatically for you, so its a problem. However, their is a fix to it too.you run the program (line 3 does so), so you may remove it. However, if you are installing alpha, you  need it.
{% endhint %}

![Example of installing the alpha version automatically.](https://2961845821-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MjPk-Yu4sOq8KGrr_yG%2F-MjcoTs8heA_XDc7J9XF%2F-MjctKFRqkqvCEtIn6DJ%2Fimage.png?alt=media\&token=553d088f-37e0-4bd9-8a28-9a52b5fbb033)
