Migrating cogs from Red V2¶
First, be sure to read discord.py’s migration guide as that covers all of the changes to discord.py that will affect the migration process
Red as a package¶
V3 makes Red a package that is installed with pip
. Please
keep this in mind when writing cogs as this affects how imports
should be done (for example, to import pagify
in V2, one
would do from .utils.chat_formatting import pagify
; in
V3, this becomes from redbot.core.utils.chat_formatting import pagify
)
Cogs as packages¶
V3 makes cogs into packages. See Creating cogs for Red V3 for more on how to create packages for V3.
Config¶
Config is V3’s replacement for dataIO
. Instead of fiddling with
creating config directories and config files as was done in V2, V3’s
Config handles that whilst allowing for easy storage of settings on a
per-server/member/user/role/channel or global basis. Be sure to check
out Config for the API docs for Config as well as a
tutorial on using Config.