@@ -482,11 +482,12 @@ async def activity(self, ctx, activity_type: str.lower, *, message: str = ""):
482482 Set an activity status for the bot.
483483
484484 Possible activity types:
485- - `playing`
486- - `streaming`
487- - `listening`
488- - `watching`
489- - `competing`
485+ - `playing`
486+ - `streaming`
487+ - `listening`
488+ - `watching`
489+ - `competing`
490+ - `custom`
490491
491492 When activity type is set to `listening`,
492493 it must be followed by a "to": "listening to..."
@@ -498,6 +499,9 @@ async def activity(self, ctx, activity_type: str.lower, *, message: str = ""):
498499 the linked twitch page:
499500 - `{prefix}config set twitch_url https://www.twitch.tv/somechannel/`
500501
502+ When activity type is set to `custom`, you can set
503+ any custom text as the activity message.
504+
501505 To remove the current activity status:
502506 - `{prefix}activity clear`
503507 """
@@ -528,6 +532,8 @@ async def activity(self, ctx, activity_type: str.lower, *, message: str = ""):
528532 msg += f"to { activity .name } ."
529533 elif activity .type == ActivityType .competing :
530534 msg += f"in { activity .name } ."
535+ elif activity .type == ActivityType .custom :
536+ msg = f"Custom activity set to: { activity .name } ."
531537 else :
532538 msg += f"{ activity .name } ."
533539
@@ -597,7 +603,9 @@ async def set_presence(self, *, status=None, activity_type=None, activity_messag
597603 elif activity_type == ActivityType .streaming :
598604 url = self .bot .config ["twitch_url" ]
599605
600- if activity_type is not None :
606+ if activity_type == ActivityType .custom :
607+ activity = discord .CustomActivity (name = activity_message )
608+ elif activity_type is not None :
601609 activity = discord .Activity (type = activity_type , name = activity_message , url = url )
602610 else :
603611 activity = None
0 commit comments