Updated on_member_join function

Karl 2 years ago committed by GitHub
parent 3a663c244f
commit a5f5b0d35d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -93,7 +93,7 @@ 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.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)

Loading…
Cancel
Save