@@ -482,11 +482,12 @@ async def activity(self, ctx, activity_type: str.lower, *, message: str = ""):
482
482
Set an activity status for the bot.
483
483
484
484
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`
490
491
491
492
When activity type is set to `listening`,
492
493
it must be followed by a "to": "listening to..."
@@ -498,6 +499,9 @@ async def activity(self, ctx, activity_type: str.lower, *, message: str = ""):
498
499
the linked twitch page:
499
500
- `{prefix}config set twitch_url https://www.twitch.tv/somechannel/`
500
501
502
+ When activity type is set to `custom`, you can set
503
+ any custom text as the activity message.
504
+
501
505
To remove the current activity status:
502
506
- `{prefix}activity clear`
503
507
"""
@@ -528,6 +532,8 @@ async def activity(self, ctx, activity_type: str.lower, *, message: str = ""):
528
532
msg += f"to { activity .name } ."
529
533
elif activity .type == ActivityType .competing :
530
534
msg += f"in { activity .name } ."
535
+ elif activity .type == ActivityType .custom :
536
+ msg = f"Custom activity set to: { activity .name } ."
531
537
else :
532
538
msg += f"{ activity .name } ."
533
539
@@ -597,7 +603,9 @@ async def set_presence(self, *, status=None, activity_type=None, activity_messag
597
603
elif activity_type == ActivityType .streaming :
598
604
url = self .bot .config ["twitch_url" ]
599
605
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 :
601
609
activity = discord .Activity (type = activity_type , name = activity_message , url = url )
602
610
else :
603
611
activity = None
0 commit comments