Skip to content

Commit 7937ce0

Browse files
committed
Does not break pre-existing configs for activity now
1 parent 46904a4 commit 7937ce0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,19 +277,19 @@ async def on_ready(self):
277277
activity_type = self.config.get('activity_type', -1)
278278
message = self.config.get('activity_message', '')
279279

280-
normalized_message = ''
281280
try:
282281
activity_type = ActivityType(activity_type)
283282
except ValueError:
284283
activity_type = -1
285284

286285
if activity_type >= 0 and message:
286+
normalized_message = message.strip()
287287
if activity_type == ActivityType.listening:
288288
if message.lower().startswith('to '):
289289
# Must be listening to...
290290
normalized_message = message[3:].strip()
291-
else:
292-
normalized_message = message.strip()
291+
else:
292+
normalized_message = ''
293293

294294
if normalized_message:
295295
if activity_type == ActivityType.streaming:

0 commit comments

Comments
 (0)