Old Pycord Guide

Pycord Guide is an unofficial guide to using the features in Pycord. It provides examples, explanations, and more.

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.

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

Installation

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

pip install py-cord

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.

Warning: Py-cord alpha can be unstable

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

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

pageInstalling Git

Installation on repl.it

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. EpikHost is fully free for Discord Bots, you just need to join their Discord Server to create an account. You may also use another cheap VPS.

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.

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

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

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.

Last updated