mirror of
https://github.com/myned/modufur.git
synced 2024-12-24 14:27:27 +00:00
Merge branch 'dev'
This commit is contained in:
commit
54b7899578
1 changed files with 3 additions and 4 deletions
|
@ -135,7 +135,8 @@ class Administration:
|
||||||
while True:
|
while True:
|
||||||
message = await self.queue.get()
|
message = await self.queue.get()
|
||||||
await asyncio.sleep(RATE_LIMIT)
|
await asyncio.sleep(RATE_LIMIT)
|
||||||
await message.delete()
|
try: await message.delete()
|
||||||
|
except d.errors.NotFound: pass
|
||||||
|
|
||||||
async def on_message(self, channel):
|
async def on_message(self, channel):
|
||||||
def check(msg):
|
def check(msg):
|
||||||
|
@ -150,8 +151,6 @@ class Administration:
|
||||||
while True:
|
while True:
|
||||||
message = await self.bot.wait_for('message', check=check)
|
message = await self.bot.wait_for('message', check=check)
|
||||||
await self.queue.put(message)
|
await self.queue.put(message)
|
||||||
except d.errors.NotFound:
|
|
||||||
pass
|
|
||||||
except exc.Abort:
|
except exc.Abort:
|
||||||
u.background['management']['auto_delete'].remove(channel.id)
|
u.background['management']['auto_delete'].remove(channel.id)
|
||||||
u.update(u.background, 'background.json')
|
u.update(u.background, 'background.json')
|
||||||
|
@ -178,4 +177,4 @@ class Administration:
|
||||||
print('Looping {}'.format(channel.id))
|
print('Looping {}'.format(channel.id))
|
||||||
await ctx.send('✅ **Auto-deleting all messages in this channel.**', delete_after=5)
|
await ctx.send('✅ **Auto-deleting all messages in this channel.**', delete_after=5)
|
||||||
else: raise exc.Exists
|
else: raise exc.Exists
|
||||||
except exc.Exists: await ctx.send('❌ **Already deleting in this channel.**')
|
except exc.Exists: await ctx.send('❌ **Already deleting in this channel.** Type `stop` to stop deleting.')
|
||||||
|
|
Loading…
Reference in a new issue