diff --git a/discord/__main__.py b/discord/__main__.py index 7be6ea815..6e34be54c 100644 --- a/discord/__main__.py +++ b/discord/__main__.py @@ -31,7 +31,7 @@ import sys from pathlib import Path import discord -import pkg_resources +import importlib.metadata import aiohttp import platform @@ -43,9 +43,9 @@ def show_version() -> None: version_info = discord.version_info entries.append('- discord.py v{0.major}.{0.minor}.{0.micro}-{0.releaselevel}'.format(version_info)) if version_info.releaselevel != 'final': - pkg = pkg_resources.get_distribution('discord.py') - if pkg: - entries.append(f' - discord.py pkg_resources: v{pkg.version}') + version = importlib.metadata.version('discord.py') + if version: + entries.append(f' - discord.py metadata: v{version}') entries.append(f'- aiohttp v{aiohttp.__version__}') uname = platform.uname()