This repository has been 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
, andROLE
options are now passed as typesUnion[discord.<type>, discord.ext.slash.Partial<type>, discord.Object]
(exception:USER
arguments can also be of typediscord.User
)Context.author
is 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
SlashBot
kwargresolve_not_fetch=True
(the default), no fetching or getting is attempted if the object can be resolved - If
SlashBot
kwargfetch_if_not_get=True
(defaultFalse
), no API fetching is attempted if getting from bot cache fails
Command.created_at
is now available
Changes
Context.author
is 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.guild
is nowUnion[discord.Guild, discord.Object, None]
instead of a guaranteed Object for the same reasonContext.me
is 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.required
set toTrue
regardless 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
Context
subclass orOption
instance) now cause aTypeError
on declaration of the command