misc cleanup
This commit is contained in:
parent
1cb36d41ae
commit
5adf365d3e
2 changed files with 4 additions and 2 deletions
|
@ -90,7 +90,7 @@ async def handle_triggers(ctx, message):
|
||||||
AND (notify_self IS 1 OR user_id IS NOT :author) -- Don't notify author unless wanted
|
AND (notify_self IS 1 OR user_id IS NOT :author) -- Don't notify author unless wanted
|
||||||
AND (bots_notify IS 1 OR :is_bot IS NOT 1) -- Don't notify from bots unless wanted
|
AND (bots_notify IS 1 OR :is_bot IS NOT 1) -- Don't notify from bots unless wanted
|
||||||
AND :author NOT IN ( -- Don't notify if...
|
AND :author NOT IN ( -- Don't notify if...
|
||||||
SELECT target FROM user_ignores -- Author is ignored in this guilde
|
SELECT target FROM user_ignores -- Author is ignored in this guild
|
||||||
WHERE user_id=user_id AND guild_id=guild_id
|
WHERE user_id=user_id AND guild_id=guild_id
|
||||||
UNION
|
UNION
|
||||||
SELECT target FROM user_blocks -- Author is blocked
|
SELECT target FROM user_blocks -- Author is blocked
|
||||||
|
@ -304,7 +304,7 @@ class Notifications(Cog):
|
||||||
@guild_only()
|
@guild_only()
|
||||||
async def ignore(self, ctx, channel):
|
async def ignore(self, ctx, channel):
|
||||||
pass
|
pass
|
||||||
# TODO: Ignore channels
|
# TODO: Ignore channels and users
|
||||||
|
|
||||||
@ignore.command()
|
@ignore.command()
|
||||||
@guild_only()
|
@guild_only()
|
||||||
|
|
|
@ -190,6 +190,7 @@ async def confirm(ctx, message, delete_msgs=False, response_check=get_positivity
|
||||||
pass
|
pass
|
||||||
return reply_bool
|
return reply_bool
|
||||||
|
|
||||||
|
|
||||||
def cleanup_code(content):
|
def cleanup_code(content):
|
||||||
"""Automatically removes code blocks from the code."""
|
"""Automatically removes code blocks from the code."""
|
||||||
# remove ```py\n```
|
# remove ```py\n```
|
||||||
|
@ -199,4 +200,5 @@ def cleanup_code(content):
|
||||||
# remove `foo`
|
# remove `foo`
|
||||||
return content.strip("` \n")
|
return content.strip("` \n")
|
||||||
|
|
||||||
|
|
||||||
# ===== End code borrowed from Avrae =====
|
# ===== End code borrowed from Avrae =====
|
||||||
|
|
Loading…
Reference in a new issue