mirror of
https://github.com/supleed2/gondilinabot-python.git
synced 2024-12-22 21:45:48 +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.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
|
return
|
||||||
else:
|
else:
|
||||||
global counter
|
global counter
|
||||||
print("Message from " + message.author.name + ": " + message.content)
|
# 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)
|
reply = re.split("(^| )(I'm|Im|i'm|im|I am|i am)( )", message.content, 1)
|
||||||
if len(reply) > 1:
|
if len(reply) > 1:
|
||||||
|
print("Message from " + message.author.name + ": " + message.content)
|
||||||
if counter > 0:
|
if counter > 0:
|
||||||
counter -= 1
|
counter -= 1
|
||||||
print("Cooldown: " + str(counter) + " messages")
|
print("Cooldown: " + str(counter) + " messages")
|
||||||
|
@ -37,8 +38,6 @@ async def on_message(message):
|
||||||
counter = random.randrange(mincooldown, maxcooldown)
|
counter = random.randrange(mincooldown, maxcooldown)
|
||||||
await message.reply("Hi " + reply[1] + ", I'm Dad")
|
await message.reply("Hi " + reply[1] + ", I'm Dad")
|
||||||
print("Replied to " + message.author.name + " with Dad Joke")
|
print("Replied to " + message.author.name + " with Dad Joke")
|
||||||
else:
|
|
||||||
print("No match, ignoring...")
|
|
||||||
|
|
||||||
|
|
||||||
with open("secrets.yaml") as stream:
|
with open("secrets.yaml") as stream:
|
||||||
|
|
Loading…
Reference in a new issue