mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[V3 Core] Add timeout exceptions to [p]servers (#1305)
This commit is contained in:
parent
9f8a008442
commit
78615b5dc8
@ -185,7 +185,11 @@ class Core:
|
|||||||
return m.author == owner
|
return m.author == owner
|
||||||
|
|
||||||
while msg is not None:
|
while msg is not None:
|
||||||
msg = await self.bot.wait_for("message", check=msg_check, timeout=15)
|
try:
|
||||||
|
msg = await self.bot.wait_for("message", check=msg_check, timeout=15)
|
||||||
|
except asyncio.TimeoutError:
|
||||||
|
await ctx.send("I guess not.")
|
||||||
|
break
|
||||||
try:
|
try:
|
||||||
msg = int(msg.content)
|
msg = int(msg.content)
|
||||||
await self.leave_confirmation(guilds[msg], owner, ctx)
|
await self.leave_confirmation(guilds[msg], owner, ctx)
|
||||||
@ -199,16 +203,16 @@ class Core:
|
|||||||
def conf_check(m):
|
def conf_check(m):
|
||||||
return m.author == owner
|
return m.author == owner
|
||||||
|
|
||||||
msg = await self.bot.wait_for("message", check=conf_check, timeout=15)
|
try:
|
||||||
|
msg = await self.bot.wait_for("message", check=conf_check, timeout=15)
|
||||||
if msg is None:
|
if msg.content.lower().strip() in ("yes", "y"):
|
||||||
|
await server.leave()
|
||||||
|
if server != ctx.guild:
|
||||||
|
await ctx.send("Done.")
|
||||||
|
else:
|
||||||
|
await ctx.send("Alright then.")
|
||||||
|
except asyncio.TimeoutError:
|
||||||
await ctx.send("I guess not.")
|
await ctx.send("I guess not.")
|
||||||
elif msg.content.lower().strip() in ("yes", "y"):
|
|
||||||
await server.leave()
|
|
||||||
if server != ctx.guild:
|
|
||||||
await ctx.send("Done.")
|
|
||||||
else:
|
|
||||||
await ctx.send("Alright then.")
|
|
||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
@checks.is_owner()
|
@checks.is_owner()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user