implement auto response
All checks were successful
Garfbot CI/CD Deployment / Deploy (push) Successful in 15s

This commit is contained in:
2025-06-04 02:22:19 -05:00
parent d70584d4f8
commit 0cb5f8fa38
2 changed files with 29 additions and 29 deletions

View File

@ -149,19 +149,20 @@ async def on_message(message):
await aod_message(garfbot, message)
# Auto-responses
guild_id = message.guild.id
content = message.content.strip()
content_lower = content.lower()
responses = garf_respond.get_responses(guild_id)
if content_lower.startswith('garfbot response'):
await garf_respond.garfbot_response(message, content)
return
if message.guild:
guild_id = message.guild.id
content = message.content
content_lower = content.lower()
responses = garf_respond.get_responses(guild_id)
for trigger, response in responses.items():
if trigger.lower() in content_lower:
await message.channel.send(response)
break
if message.content.lower().startswith('garfbot response '):
await garf_respond.garfbot_response(message, content)
return
for trigger, response in responses.items():
if trigger.lower() in content_lower:
await message.channel.send(response)
break
async def garfbot_connect():