@@ -163,13 +163,16 @@ async def get_pre(bot, message):
163
163
return [bot .prefix , f'<@{ bot .user .id } > ' , f'<@!{ bot .user .id } > ' ]
164
164
165
165
async def on_connect (self ):
166
- print (line + Fore .RED + Style .BRIGHT )
166
+ print (line )
167
+ print (Fore .CYAN , end = '' )
167
168
if not self .selfhosted :
168
- print ('Mode: using api.modmail.tk' )
169
+ print ('MODE: Using the Modmail API' )
170
+ print (line )
169
171
await self .validate_api_token ()
170
172
print (line )
171
173
else :
172
- print ('Mode: selfhosting logs.' )
174
+ print ('Mode: Selfhosting logs.' )
175
+ print (line )
173
176
print (Fore .CYAN + 'Connected to gateway.' )
174
177
await self .config .refresh ()
175
178
status = self .config .get ('status' )
@@ -364,12 +367,16 @@ async def validate_api_token(self):
364
367
try :
365
368
self .config .modmail_api_token
366
369
except KeyError :
370
+ print (Fore .RED + Style .BRIGHT , end = '' )
367
371
print ('MODMAIL_API_TOKEN not found.' )
368
372
print ('Set a config variable called MODMAIL_API_TOKEN with a token from https://dashboard.modmail.tk' )
373
+ print ('If you want to selfhost logs, input a MONGO_URI config variable.' )
374
+ print ('A modmail api token is not needed if you are selfhosting logs.' )
369
375
valid = False
370
376
else :
371
377
valid = await self .modmail_api .validate_token ()
372
378
if not valid :
379
+ print (Fore .RED + Style .BRIGHT , end = '' )
373
380
print ('Invalid MODMAIL_API_TOKEN - get one from https://dashboard.modmail.tk' )
374
381
finally :
375
382
if not valid :
0 commit comments