This repository was archived by the owner on Feb 3, 2025. It is now read-only.
0.4.0
New Stuff
- Support new API "resolved" object
USER,CHANNEL, andROLEoptions are now passed as typesUnion[discord.<type>, discord.ext.slash.Partial<type>, discord.Object](exception:USERarguments can also be of typediscord.User)Context.authoris nowUnion[discord.Member, discord.ext.slash.PartialMember, None]- second thanks to new changes, third because slash commands can be run in DMs with no member context- If
SlashBotkwargresolve_not_fetch=True(the default), no fetching or getting is attempted if the object can be resolved - If
SlashBotkwargfetch_if_not_get=True(defaultFalse), no API fetching is attempted if getting from bot cache fails
Command.created_atis now available
Changes
Context.authoris now no longer guaranteed to be adiscord.Member(it is nowOptional[discord.Member]) because slash commands can be run in DMs now which have no member contextContext.guildis nowUnion[discord.Guild, discord.Object, None]instead of a guaranteed Object for the same reasonContext.meis nowUnion[discord.Member, discord.Object]instead ofOptional[discord.Member]to be consistent- Parameters to command coroutines that are required by the coro now automatically have their
Option.requiredset toTrueregardless of the previous value - Parameters to command coros that are required by the coro but cannot have values passed to them by the library/API (i.e. not annotated with a
Contextsubclass orOptioninstance) now cause aTypeErroron declaration of the command