Last active
March 17, 2017 15:27
-
-
Save jayktaylor/96ae5633dec9ea87c70c48ab191413ed to your computer and use it in GitHub Desktop.
MusicBot - Remove bot from server by ID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async def cmd_leaveserver(self, id): | |
""" | |
Usage: | |
{command_prefix}leaveserver <id> | |
Removes the bot from a specific server via ID | |
""" | |
target = self.get_server(id) | |
if target is None: | |
raise exceptions.CommandError('The server {} does not exist'.format(id), expire_in=30) | |
else: | |
await self.leave_server(target) | |
return Response("Left server successfully: {0.name} ({0.id})".format(target)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment