mirror of
https://github.com/AskDavis/nate-discord.git
synced 2026-01-01 05:05:58 -08:00
avoid rate limit issue with message processing
This commit is contained in:
@@ -12,9 +12,10 @@ class MyClient(discord.Client):
|
||||
async def on_message(self, message):
|
||||
if message.author == self.user:
|
||||
return
|
||||
chat_response=chatgpt_response(message.content)
|
||||
if "mabel" in message.content.lower() or "Mabel" in message.content.lower():
|
||||
print(message.content)
|
||||
message_content=message.content
|
||||
chat_response=chatgpt_response(message_content)
|
||||
if "mabel" in message_content.lower() or "Mabel" in message_content.lower():
|
||||
print(message_content)
|
||||
await message.channel.send(f"{chat_response}")
|
||||
return
|
||||
intents=discord.Intents.default()
|
||||
|
||||
Reference in New Issue
Block a user