mirror of
https://github.com/supleed2/gondilinabot-python.git
synced 2024-12-22 05:25:49 +00:00
Clean up logs
This commit is contained in:
parent
558eabccca
commit
34ce7b1716
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
|
@ -1,3 +1,4 @@
|
|||
{
|
||||
"python.pythonPath": "gondilinabot\\Scripts\\python.exe",
|
||||
"python.linting.pylintEnabled": true,
|
||||
}
|
7
app.py
7
app.py
|
@ -27,9 +27,10 @@ async def on_message(message):
|
|||
return
|
||||
else:
|
||||
global counter
|
||||
print("Message from " + message.author.name + ": " + message.content)
|
||||
reply = re.split("(^| )(I'm |Im |i'm |im |I am |i am )", message.content, 1)
|
||||
# TODO: Add detection for "genshin" and replace with "g*nshin"
|
||||
reply = re.split("(^| )(I'm|Im|i'm|im|I am|i am)( )", message.content, 1)
|
||||
if len(reply) > 1:
|
||||
print("Message from " + message.author.name + ": " + message.content)
|
||||
if counter > 0:
|
||||
counter -= 1
|
||||
print("Cooldown: " + str(counter) + " messages")
|
||||
|
@ -37,8 +38,6 @@ async def on_message(message):
|
|||
counter = random.randrange(mincooldown, maxcooldown)
|
||||
await message.reply("Hi " + reply[1] + ", I'm Dad")
|
||||
print("Replied to " + message.author.name + " with Dad Joke")
|
||||
else:
|
||||
print("No match, ignoring...")
|
||||
|
||||
|
||||
with open("secrets.yaml") as stream:
|
||||
|
|
Loading…
Reference in a new issue