mirror of
https://github.com/myned/modufur.git
synced 2024-12-24 14:27:27 +00:00
Changed "stop" tasks command to be specific to each task (ie stop rev)
This commit is contained in:
parent
165d134b6d
commit
70ec1bdb9c
2 changed files with 17 additions and 15 deletions
|
@ -135,6 +135,7 @@ class MsG:
|
|||
if reaction.emoji == '\N{HEAVY BLACK HEART}' and reaction.message.id == message.id:
|
||||
raise exc.Save(user)
|
||||
return False
|
||||
if 'stop h' in msg.content.lower():
|
||||
|
||||
try:
|
||||
await message.add_reaction('\N{HEAVY BLACK HEART}')
|
||||
|
@ -150,6 +151,7 @@ class MsG:
|
|||
|
||||
except asyncio.TimeoutError:
|
||||
await message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
|
||||
await ctx.send('**Already auto-hearting in {}.** Type `stop h(earting)` to stop.'.format(ctx.channel.mention), delete_after=7)
|
||||
|
||||
# @cmds.command()
|
||||
# async def auto_post(self, ctx):
|
||||
|
@ -518,7 +520,7 @@ class MsG:
|
|||
|
||||
async def queue_for_reversification(self, channel):
|
||||
def check(msg):
|
||||
if msg.content.lower() == 'stop' and msg.channel is channel and msg.author.guild_permissions.administrator:
|
||||
if 'stop r' in msg.content.lower() and msg.channel is channel and msg.author.guild_permissions.administrator:
|
||||
raise exc.Abort
|
||||
elif msg.channel is channel and msg.author.id != self.bot.user.id and (re.search('(https?:\/\/[^ ]*\.(?:gif|png|jpg|jpeg))', msg.content) is not None or msg.attachments or msg.embeds):
|
||||
return True
|
||||
|
@ -553,7 +555,7 @@ class MsG:
|
|||
print('STARTED : auto-reversifying in #{}'.format(ctx.channel.name))
|
||||
await ctx.send('**Auto-reversifying all images in** {}'.format(ctx.channel.mention), delete_after=5)
|
||||
else:
|
||||
await ctx.send('**Already auto-reversifying in {}.** Type `stop` to stop.'.format(ctx.channel.mention), delete_after=7)
|
||||
await ctx.send('**Already auto-reversifying in {}.** Type `stop r(eversifying)` to stop.'.format(ctx.channel.mention), delete_after=7)
|
||||
await ctx.message.add_reaction('\N{CROSS MARK}')
|
||||
|
||||
async def _get_pool(self, ctx, *, destination, booru='e621', query=[]):
|
||||
|
|
|
@ -128,7 +128,7 @@ class Administration:
|
|||
|
||||
async def queue_for_deletion(self, channel):
|
||||
def check(msg):
|
||||
if msg.content.lower() == 'stop' and msg.channel is channel and msg.author.guild_permissions.administrator:
|
||||
if 'stop d' in msg.content.lower() and msg.channel is channel and msg.author.guild_permissions.administrator:
|
||||
raise exc.Abort
|
||||
elif msg.channel is channel and not msg.pinned:
|
||||
return True
|
||||
|
@ -136,7 +136,7 @@ class Administration:
|
|||
|
||||
try:
|
||||
async for message in channel.history(limit=None):
|
||||
if message.content.lower() == 'stop' and message.author.guild_permissions.administrator:
|
||||
if 'stop d' in message.content.lower() and message.author.guild_permissions.administrator:
|
||||
raise exc.Abort
|
||||
if not message.pinned:
|
||||
await self.queue.put(message)
|
||||
|
@ -170,7 +170,7 @@ class Administration:
|
|||
raise exc.Exists
|
||||
|
||||
except exc.Exists:
|
||||
await ctx.send('**Already auto-deleting in {}.** Type `stop` to stop.'.format(ctx.channel.mention), delete_after=7)
|
||||
await ctx.send('**Already auto-deleting in {}.** Type `stop d(eleting)` to stop.'.format(ctx.channel.mention), delete_after=7)
|
||||
await ctx.message.add_reaction('\N{CROSS MARK}')
|
||||
|
||||
@cmds.group(aliases=['setting', 'set', 's'])
|
||||
|
|
Loading…
Reference in a new issue