Table of contents
This page is generated from
docs/update_red.rst- please edit the source file instead of this page.
Updating Red
Updating to the latest version of Red has several benefits:
- New features and improvements are added.
- Bugs are fixed.
- Your bot is safe from security vulnerabilities that have been found.
Here are some things to consider to help make your upgrade as smooth as possible.
NOTE
If you're developing for Red, you should also look for "Breaking changes" sections in release notes for each minor (X.Y.0) version that's been released since you last updated Red. To make the migration process easier, we also provide an extensive Backward incompatible changes document explaining the breaking changes we've made in more detail.
IMPORTANT
Make sure to read the Read before updating sections of the changelogs for all releases that were published since you last updated your instance. They contain important information and if you don't read them, you might run into some issues later.
Updating differs depending on the version you currently have. Next sections will explain how to upgrade to latest version of Red (3.6.8) from the version that is in the header of the section.
Choose the version you're currently on from the list below:
Red 3.6.0 or newer
NOTE
If you installed any package into Red's virtual environment other than Red, please note that they will not be kept after the update.
Windows
If you have Red 3.6.0 or newer, you can upgrade by following these steps:
-
Shut your bot down.
-
Activate your venv with the following command:
C:\> "%userprofile%\redenv\Scripts\activate.bat" -
Update Red with this command:
(redenv) C:\> python -m pip install -U "Red-DiscordBot @ git+https://git.nebendahl.eu/Mrcoolgamer11/Red-DiscordBot.git@3.6.8"ATTENTION
If you're using PostgreSQL data backend, replace
Red-DiscordBotin the command withRed-DiscordBot[postgres].NOTE
redbot-updateonly knows about the versions published on PyPI, so it can't be used to update to a version of this fork. -
Start your bot.
Linux & Mac
If you have Red 3.6.0 or newer, you can upgrade by following these steps:
-
Shut your bot down.
-
Activate your virtual environment.
If you used
venvfor your virtual environment, use:$ source ~/redenv/bin/activate -
Update Red with this command:
(redenv) $ python -m pip install -U 'Red-DiscordBot @ git+https://git.nebendahl.eu/Mrcoolgamer11/Red-DiscordBot.git@3.6.8'ATTENTION
If you're using PostgreSQL data backend, replace
Red-DiscordBotin the command withRed-DiscordBot[postgres].NOTE
redbot-updateonly knows about the versions published on PyPI, so it can't be used to update to a version of this fork. -
Start your bot.
Red 3.5.0-3.5.24
Windows
If you have a Red version between 3.5.0 and 3.5.24, you can upgrade by following these steps:
-
Shut your bot down.
-
Activate your venv with the following command:
C:\> "%userprofile%\redenv\Scripts\activate.bat" -
Update Red with this command:
(redenv) C:\> python -m pip install -U "Red-DiscordBot @ git+https://git.nebendahl.eu/Mrcoolgamer11/Red-DiscordBot.git@3.6.8"ATTENTION
If you're using PostgreSQL data backend, replace
Red-DiscordBotin the second command withRed-DiscordBot[postgres] -
Start your bot.
-
If you have any 3rd-party cogs installed, we highly recommend you update them with this command in Discord:
[p]cog update([p]is considered as your prefix)
Linux & Mac
If you have a Red version between 3.5.0 and 3.5.24, you can upgrade by following these steps:
-
Shut your bot down.
-
Activate your virtual environment.
If you used
venvfor your virtual environment, use:$ source ~/redenv/bin/activate -
Update Red with this command:
(redenv) $ python -m pip install -U 'Red-DiscordBot @ git+https://git.nebendahl.eu/Mrcoolgamer11/Red-DiscordBot.git@3.6.8'ATTENTION
If you're using PostgreSQL data backend, replace
Red-DiscordBotin the second command withRed-DiscordBot[postgres] -
Start your bot.
-
If you have any 3rd-party cogs installed, we highly recommend you update them with this command in Discord:
[p]cog update([p]is considered as your prefix)
Red 3.2.0-3.4.19
Windows
If you have a Red version between 3.2.0 and 3.4.19, you can upgrade by following these steps:
-
Shut your bot down.
-
Activate your venv with the following command:
C:\> "%userprofile%\redenv\Scripts\activate.bat" -
Update Red with this command:
(redenv) C:\> python -m pip install -U "Red-DiscordBot @ git+https://git.nebendahl.eu/Mrcoolgamer11/Red-DiscordBot.git@3.6.8"ATTENTION
If you're using PostgreSQL data backend, replace
Red-DiscordBotin the second command withRed-DiscordBot[postgres] -
If you're using any 3rd-party cogs:
- Start your bot with
--no-cogs --load-cogs downloaderflags, for example:(redenv) C:\> redbot <your instance name> --no-cogs --load-cogs downloader - Wait for the bot to start.
- Run the
[p]cog updatecommand on Discord. - Wait for the bot to stop typing and send a response. This step may take a while.
- Shutdown the bot with the
[p]shutdowncommand.
- Start your bot with
-
Start your bot as you normally do.
Linux & Mac
If you have a Red version between 3.2.0 and 3.4.19, you can upgrade by following these steps:
-
Shut your bot down.
-
Activate your virtual environment.
If you used
venvfor your virtual environment, use:$ source ~/redenv/bin/activate -
Update Red with this command:
(redenv) $ python -m pip install -U 'Red-DiscordBot @ git+https://git.nebendahl.eu/Mrcoolgamer11/Red-DiscordBot.git@3.6.8'ATTENTION
If you're using PostgreSQL data backend, replace
Red-DiscordBotin the second command withRed-DiscordBot[postgres] -
If you're using any 3rd-party cogs:
- Start your bot with
--no-cogs --load-cogs downloaderflags, for example:(redenv) $ redbot <your instance name> --no-cogs --load-cogs downloader - Wait for the bot to start.
- Run the
[p]cog updatecommand on Discord. - Wait for the bot to stop typing and send a response. This step may take a while.
- Shutdown the bot with the
[p]shutdowncommand.
- Start your bot with
-
Start your bot as you normally do.
Red 3.1.X
If you have Red 3.1.X, you will need to follow the install instructions for your operating system. Make sure that you turn your bot off first.
Go to the Installing Red guide and follow every step to ensure you have all dependencies up-to-date and only skip the redbot-setup step as you already have a bot instance.
If you already have Red installed in a virtual environment, you will need to delete it before starting this process.
ATTENTION
Red 3.2 dropped support for the MongoDB driver
- If you were not using the MongoDB driver, this does not affect you.
- If you were using a 3rd party cog which required MongoDB, it probably still does.
- If you were using the MongoDB driver, prior to launching your instance after update, you will need to run the following commands to convert:
(redenv) $ python -m pip install dnspython~=1.16.0 motor~=2.0.0 pymongo~=3.8.0 (redenv) $ redbot-setup convert [instancename] json
Red 3.0.2 and older
IMPORTANT
Red 3.2 dropped support for the MongoDB driver
- If you were not using the MongoDB driver, this does not affect you.
- If you were using a 3rd party cog which required MongoDB, it probably still does.
- If you were using the MongoDB driver, prior to updating, you will need to convert your data to JSON backend, using following command:
(redenv) $ redbot-setup --edit
If you have Red 3.0.2 or older, you will need to follow the install instructions for your operating system. Make sure that you turn your bot off first.
Go to the Installing Red guide and follow every step to ensure you have all dependencies up-to-date and only skip the redbot-setup step as you already have a bot instance.
If you already have Red installed in a virtual environment, you will need to delete it before starting this process.
Installation Guides
- Installing Red
- Creating a bot account
- Updating Red
- Backing Up and Restoring Red
- About Virtual Environments
- Setting up auto-restart using batch on Windows
- Setting up auto-restart on Mac
- Setting up auto-restart using systemd on Linux
Cog Reference
User guides
- Getting started
- Running Red on Fluxer
- About Privileged Intents
- About public (big) bots
- Admin
- Alias
- Audio
- Cleanup
- Cog Manager UI
- Core
- CustomCommands
- Dev
- Downloader
- Economy
- Filter
- General
- Image
- Permissions
- Mod
- ModLog
- Mutes
- Reports
- Streams
- Trivia
- Warnings
- Red and End User Data
Cog Creation Guides
- Creating cogs for Red
- Slash Commands and Interactions
- Publishing cogs for Red
- Becoming an Approved Cog Creator
- Versioning
- End-user Guarantees
- Developer Guarantees
- Breaking Change Notices
Cog Development Framework Reference
- Shared API Keys
- Bank
- Bot
- Command Check Decorators
- App Command Check Decorators
- Commands Package
- App Commands Package
- Config
- Data Manager
- Custom Events
- Internationalization Framework
- Mod log
- RPC
- Tree
- Utility Functions
Others
Legacy (Red V2)