diff --git a/discord/ext/commands/context.py b/discord/ext/commands/context.py index ee34e1275..40ef48cf8 100644 --- a/discord/ext/commands/context.py +++ b/discord/ext/commands/context.py @@ -436,7 +436,7 @@ class Context(discord.abc.Messageable, Generic[BotT]): .. versionadded:: 2.3 """ - return self.guild.filesize_limit if self.guild is not None else 26214400 + return self.guild.filesize_limit if self.guild is not None else discord.utils.DEFAULT_FILE_SIZE_LIMIT_BYTES @discord.utils.cached_property def guild(self) -> Optional[Guild]: diff --git a/discord/guild.py b/discord/guild.py index ea5d3a967..0c50f5aeb 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -324,9 +324,9 @@ class Guild(Hashable): ) _PREMIUM_GUILD_LIMITS: ClassVar[Dict[Optional[int], _GuildLimit]] = { - None: _GuildLimit(emoji=50, stickers=5, bitrate=96e3, filesize=26214400), - 0: _GuildLimit(emoji=50, stickers=5, bitrate=96e3, filesize=26214400), - 1: _GuildLimit(emoji=100, stickers=15, bitrate=128e3, filesize=26214400), + None: _GuildLimit(emoji=50, stickers=5, bitrate=96e3, filesize=utils.DEFAULT_FILE_SIZE_LIMIT_BYTES), + 0: _GuildLimit(emoji=50, stickers=5, bitrate=96e3, filesize=utils.DEFAULT_FILE_SIZE_LIMIT_BYTES), + 1: _GuildLimit(emoji=100, stickers=15, bitrate=128e3, filesize=utils.DEFAULT_FILE_SIZE_LIMIT_BYTES), 2: _GuildLimit(emoji=150, stickers=30, bitrate=256e3, filesize=52428800), 3: _GuildLimit(emoji=250, stickers=60, bitrate=384e3, filesize=104857600), } diff --git a/discord/utils.py b/discord/utils.py index 6d1e2ed17..3ee867975 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -100,6 +100,7 @@ __all__ = ( ) DISCORD_EPOCH = 1420070400000 +DEFAULT_FILE_SIZE_LIMIT_BYTES = 26214400 class _MissingSentinel: