Skip to content

Instantly share code, notes, and snippets.

@Painezor
Painezor / Checks.py
Last active April 20, 2025 16:07
Built-in Checks for the commands extension of discord py
@commands.guild_only()
# Command cannot be used in private messages.
@commands.dm_only()
# Command can only be used in private messages.
@commands.is_owner()
# Command can only be used by the bot owner.
@commands.is_nsfw()
@Zearin
Zearin / python_decorator_guide.md
Last active October 9, 2025 10:02
The best explanation of Python decorators I’ve ever seen. (An archived answer from StackOverflow.)

NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.


Q: How can I make a chain of function decorators in Python?


If you are not into long explanations, see [Paolo Bergantino’s answer][2].