Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Chippers255
Copy link
Collaborator

@Chippers255 Chippers255 commented Jan 2, 2025

Summary

Title. Fixes #1041

Checklist
  • this is a source code change
    • run format in the repository root
    • run pytest in the repository root
    • link to issue being fixed using a fixes keyword, if such an issue exists
    • update the wiki documentation if necessary
  • or, this is not a source code change

Copy link

codecov bot commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.42%. Comparing base (35780a3) to head (2482975).

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.
📢 Have feedback on the report? Share it here.

@@ -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"))
Copy link
Member

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

❇️ add date time of the message for !truth
3 participants