Skip to content

Commit

Permalink
fix plugin: new require_bot_privilege decorator again (but for real t…
Browse files Browse the repository at this point in the history
…his time)

Co-authored-by: dgw <dgw@technobabbl.es>
  • Loading branch information
Exirel and dgw authored Nov 9, 2020
1 parent 3148a30 commit 0f0d180
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sopel/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,10 +898,11 @@ def guarded(bot, trigger, *args, **kwargs):


def require_bot_privilege(level, message=None, reply=False):
"""Decorate a function to require the bot a privilege level or above.
"""Decorate a function to require a minimum channel privilege for the bot.
:param int level: required privilege level to use this command
:param str message: optional message said to insufficiently privileged user
:param int level: minimum channel privilege the bot needs for this function
:param str message: optional message said if the bot's channel privilege
level is insufficient
:param bool reply: use :meth:`~.bot.Sopel.reply` instead of
:meth:`~.bot.Sopel.say` when ``True``; defaults to
``False``
Expand Down

0 comments on commit 0f0d180

Please sign in to comment.