-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 🍻 add current date to TRUTH prompt #1042
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1042 +/- ##
=======================================
Coverage 96.42% 96.42%
=======================================
Files 96 96
Lines 2295 2296 +1
Branches 172 172
=======================================
+ Hits 2213 2214 +1
Misses 71 71
Partials 11 11 ☔ View full report in Codecov by Sentry. |
@@ -67,7 +70,7 @@ async def truth(self, ctx: commands.Context): | |||
async def fact_check(self, message: discord.Message) -> str: | |||
try: | |||
content = message.content | |||
prompt = TRUTH_PROMPT.format(user_name=message.author.display_name, user_message=content) | |||
prompt = TRUTH_PROMPT.format(user_name=message.author.display_name, user_message=content, date=datetime.datetime.now().strftime("%B %d, %Y")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imo it makes more sense to use the timestamp of the original message, or maybe the edited date if it exists.
https://discordpy.readthedocs.io/en/stable/api.html#discord.Message.created_at
This is likely close enough, but we have had situations already where the !truth message comes several hours after the original message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👆
Summary
Title. Fixes #1041
Checklist
format
in the repository rootpytest
in the repository root