aboutsummaryrefslogtreecommitdiff
path: root/discord
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-06-20 23:55:17 -0400
committerRapptz <[email protected]>2017-06-20 23:55:17 -0400
commitc23ef9e8a4c97fc6272b7a62c446b1f12130bdc9 (patch)
tree7aca1e54071e5f9cf9c2b46df184c72bd5611516 /discord
parent[commands] Add Bot.check_once for a global check that is called once. (diff)
downloaddiscord.py-c23ef9e8a4c97fc6272b7a62c446b1f12130bdc9.tar.xz
discord.py-c23ef9e8a4c97fc6272b7a62c446b1f12130bdc9.zip
[commands] Add __global_check_once to list of cog functions.
Diffstat (limited to 'discord')
-rw-r--r--discord/__main__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/discord/__main__.py b/discord/__main__.py
index 5f8b0daf..d40d404d 100644
--- a/discord/__main__.py
+++ b/discord/__main__.py
@@ -119,6 +119,10 @@ cog_extras = '''
# checks that apply to every command to the bot
return True
+ async def __global_check_once(self, ctx):
+ # check that apply to every command but is guaranteed to be called only once
+ return True
+
async def __error(self, ctx, error):
# error handling to every command in here
pass