From 153f4d20f15b6b76f638e053f3dc82c6e6016be4 Mon Sep 17 00:00:00 2001 From: Michael H Date: Thu, 26 Dec 2019 15:34:37 -0500 Subject: [PATCH] exta info in docs about context attrs (#3151) * exta info in docs about context attrs * changelog * slight addition for clarity --- changelog.d/3151.docs.rst | 1 + redbot/core/commands/context.py | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 changelog.d/3151.docs.rst diff --git a/changelog.d/3151.docs.rst b/changelog.d/3151.docs.rst new file mode 100644 index 000000000..d086946e1 --- /dev/null +++ b/changelog.d/3151.docs.rst @@ -0,0 +1 @@ +Document additional attributes in Context diff --git a/redbot/core/commands/context.py b/redbot/core/commands/context.py index 12e51928c..5720eedb3 100644 --- a/redbot/core/commands/context.py +++ b/redbot/core/commands/context.py @@ -20,6 +20,23 @@ class Context(commands.Context): All context passed into commands will be of this type. This class inherits from `discord.ext.commands.Context`. + + Attributes + ---------- + assume_yes: bool + Whether or not interactive checks should + be skipped and assumed to be confirmed. + + This is intended for allowing automation of tasks. + + An example of this would be scheduled commands + not requiring interaction if the cog developer + checks this value prior to confirming something interactively. + + Depending on the potential impact of a command, + it may still be appropriate not to use this setting. + permission_state: PermState + The permission state the current context is in. """ def __init__(self, **attrs):