Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

Update Context #110

Open
bleudev opened this issue Mar 23, 2023 · 0 comments
Open

Update Context #110

bleudev opened this issue Mar 23, 2023 · 0 comments
Labels
in progress In progress

Comments

@bleudev
Copy link
Owner

bleudev commented Mar 23, 2023

Description of your idea

Add some variables and properies to Context object

Solution

ctx = Context(...)

ctx.author # Member object
ctx.id # or int(ctx)
ctx.token # or str(ctx)
repr(ctx) # Context('https://...', author=Member(...))
ctx.message # Message object
ctx.command # Command object

command = Command(...)

command.name # or str(command)
command.id # or int(command)
command.resolved # ResolvedData object

resolved = ResolvedData(...)

resolved.users
resolved.members
resolved.roles

command.type # int object
command.guilds # array of Guild object
command.guild_ids # array of int object

command.localizations # Localizations object
command.localizations.description # dict[str, str] object where key is localization name (f. e. 'ru') and value is localization string
command.localizations.name # dict[str, str] object
@bleudev bleudev added the in progress In progress label Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
in progress In progress
Projects
None yet
Development

No branches or pull requests

1 participant