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):
|
async def on_message(self, message):
|
||||||
if message.author == self.user:
|
if message.author == self.user:
|
||||||
return
|
return
|
||||||
chat_response=chatgpt_response(message.content)
|
message_content=message.content
|
||||||
if "mabel" in message.content.lower() or "Mabel" in message.content.lower():
|
chat_response=chatgpt_response(message_content)
|
||||||
print(message.content)
|
if "mabel" in message_content.lower() or "Mabel" in message_content.lower():
|
||||||
|
print(message_content)
|
||||||
await message.channel.send(f"{chat_response}")
|
await message.channel.send(f"{chat_response}")
|
||||||
return
|
return
|
||||||
intents=discord.Intents.default()
|
intents=discord.Intents.default()
|
||||||
|
|||||||
Reference in New Issue
Block a user