DiscordPyOutdated for v2 or below, not above

This commit is contained in:
ilkergzlkkr 2022-09-04 02:06:11 +03:00
parent 216c9d8bf5
commit c58ce76ac8
1 changed files with 2 additions and 2 deletions

View File

@ -8,12 +8,12 @@ The modern Lavalink wrapper designed for discord.py.
""" """
import discord import discord
if not discord.__version__.startswith("2.0"): if not discord.version_info.major >= 2:
class DiscordPyOutdated(Exception): class DiscordPyOutdated(Exception):
pass pass
raise DiscordPyOutdated( raise DiscordPyOutdated(
"You must have discord.py 2.0 to use this library. " "You must have discord.py (v2.0 or greater) to use this library. "
"Uninstall your current version and install discord.py 2.0 " "Uninstall your current version and install discord.py 2.0 "
"using 'pip install discord.py'" "using 'pip install discord.py'"
) )