mirror of
https://github.com/supleed2/gondilinabot-python.git
synced 2024-12-22 21:45:48 +00:00
Add unconditional reply and counter init message to log
This commit is contained in:
parent
7e7a30e1d6
commit
b219f9b65c
16
app.py
16
app.py
|
@ -16,6 +16,7 @@ async def on_ready():
|
||||||
print("Logged in as")
|
print("Logged in as")
|
||||||
print(bot.user.name + "#" + bot.user.discriminator)
|
print(bot.user.name + "#" + bot.user.discriminator)
|
||||||
print(bot.user.id)
|
print(bot.user.id)
|
||||||
|
print("Init Counter: " + str(counter))
|
||||||
await bot.change_presence(
|
await bot.change_presence(
|
||||||
status=discord.Status.online, activity=discord.Game(name="with Godlina")
|
status=discord.Status.online, activity=discord.Game(name="with Godlina")
|
||||||
)
|
)
|
||||||
|
@ -25,6 +26,21 @@ async def on_ready():
|
||||||
async def on_message(message):
|
async def on_message(message):
|
||||||
if message.author == bot.user:
|
if message.author == bot.user:
|
||||||
return
|
return
|
||||||
|
elif message.author.id == 581890740360052764:
|
||||||
|
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)
|
||||||
|
print(
|
||||||
|
"Reply: Length:"
|
||||||
|
+ str(len(reply))
|
||||||
|
+ ", Final Contents: {"
|
||||||
|
+ reply[-1]
|
||||||
|
+ "}"
|
||||||
|
)
|
||||||
|
await message.reply("Hi " + reply[-1] + ", I'm Dad")
|
||||||
|
print(
|
||||||
|
"Replied unconditionally to " + message.author.name + " with Dad Joke"
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
global counter
|
global counter
|
||||||
# TODO: Add detection for "genshin" and replace with "g*nshin"
|
# TODO: Add detection for "genshin" and replace with "g*nshin"
|
||||||
|
|
Loading…
Reference in a new issue