@ -98,11 +98,19 @@ class GPT3ComCon(commands.Cog, name="GPT3ComCon"):
async def on_member_join ( self , member ) :
if self . welcome_message_enabled ( ) :
query = f " Please generate a welcome message for { member . name } who has just joined the server. "
welcome_message = self . model . send_request ( query , tokens = self . usage_service . count_tokens ( query ) )
welcome_message = self . model . send_request (
query , tokens = self . usage_service . count_tokens ( query )
)
if not welcome_message :
welcome_message = EnvService . get_welcome_message ( )
welcome_embed = discord . Embed ( title = f " Welcome, { member . name } ! " , description = welcome_message )
welcome_embed . add_field ( name = " Just so you know... " , value = " > My commands are invoked with a forward slash ( " / " ) \n > Use /help to see my help message(s). " )
welcome_embed = discord . Embed (
title = f " Welcome, { member . name } ! " , description = welcome_message
)
welcome_embed . add_field (
name = " Just so you know... " ,
value = " > My commands are invoked with a forward slash ( "
/ " ) \n > Use /help to see my help message(s). " ,
)
await member . send ( content = None , embed = welcome_embded )
@commands.Cog.listener ( )