File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 1
1
.env
2
- logs /
2
+ * .log
Original file line number Diff line number Diff line change @@ -130,12 +130,14 @@ async def on_message(message):
130
130
Lets the bot say happy birthday whenever a user says it
131
131
"""
132
132
133
- await message .channel .send ('Happy Birthday! 🎈🎉🎂' )
134
-
135
- await bot .process_commands (message )
133
+ mentions = message .mentions
134
+ author = message .author .name + "(" + str (message .author .id ) + ")"
135
+ logging .info (f"{ author } wished happy birthday to { len (mentions )} user(s)." )
136
+ for recipient in mentions :
137
+ await message .channel .send (f"Happy Birthday <@{ recipient .id } >! 🎈🎉🎂" )
136
138
137
139
138
- if 'im' in message .content .lower () or 'i\' m' in message .content .lower () or 'i am' in message .content .lower ():
140
+ elif 'im' in message .content .lower () or 'i\' m' in message .content .lower () or 'i am' in message .content .lower ():
139
141
"""
140
142
Lets the bot tell the famous "Hi x! I'm dad!" joke
141
143
"""
@@ -156,4 +158,6 @@ async def on_message(message):
156
158
break
157
159
158
160
159
- bot .run (TOKEN )
161
+ await bot .process_commands (message )
162
+
163
+ bot .run (TOKEN )
You can’t perform that action at this time.
0 commit comments