mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[V3 Core] fix a couple issues with [p]servers (#1580)
This commit is contained in:
parent
fb093b7411
commit
b3ad5d90ed
@ -280,7 +280,7 @@ class Core:
|
||||
guilds = sorted(list(self.bot.guilds),
|
||||
key=lambda s: s.name.lower())
|
||||
msg = ""
|
||||
for i, server in enumerate(guilds):
|
||||
for i, server in enumerate(guilds, 1):
|
||||
msg += "{}: {}\n".format(i, server.name)
|
||||
|
||||
msg += "\nTo leave a server, just type its number."
|
||||
@ -313,6 +313,9 @@ class Core:
|
||||
try:
|
||||
msg = await self.bot.wait_for("message", check=conf_check, timeout=15)
|
||||
if msg.content.lower().strip() in ("yes", "y"):
|
||||
if server.owner == ctx.bot.user:
|
||||
await ctx.send("I cannot leave a guild I am the owner of.")
|
||||
return
|
||||
await server.leave()
|
||||
if server != ctx.guild:
|
||||
await ctx.send("Done.")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user