Last active
September 28, 2016 13:42
-
-
Save jayktaylor/77d3d5eaa1371c576fb6db4eb6529520 to your computer and use it in GitHub Desktop.
Presence changing command
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 c_presence(self, option=None): | |
""" | |
Changes your presence on Discord | |
{prefix}presence <status> | |
Leave blank to reset presence to online. | |
""" | |
afk = False | |
if option is None: | |
option = 'online' | |
else: | |
option = option.lower() | |
if any(s == option for s in [e.value for e in discord.Status]): | |
if option == 'idle': | |
afk = True | |
await self.bot.change_presence(status=option, afk=afk) | |
return Response(":white_check_mark: Set presence to {}!".format(option)) | |
else: | |
raise InvalidUsage() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment