2 Commits

Author SHA1 Message Date
1213e08c7b forgot the hashtags 2025-06-05 05:09:27 -05:00
8605f7f732 add a badge; not sure if it works yet 2025-06-05 05:08:11 -05:00
2 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
# The new [QuotesBot](https://bots.fyrfli.social/@quotesbot) code
![](https://fyrfli.dev/fyrfli/quotesbot/actions/workflows/deploy/badge.svg?branch=main&event=run)
In the neverending quest to improve my coding skills, I often check out the code that other bots employ Last night, I decided to check out the code for the [ThursdayBot](https://github.com/devashishp/thursday) and realised something really neat:

2
app.py
View File

@ -17,5 +17,5 @@ if source_object.reason == "OK":
print(choices[0])
choice = choices[randint(0, len(choices) - 1)]
headers = {'Authorization': 'Bearer ' + post_token}
payload = {'status': f"{choice['quote']}\n\n - {choice['author']}", 'privacy': 'public'}
payload = {'status': f"{choice['quote']}\n\n - {choice['author']}\n\n#RandomQuote #quotes #quote #bot", 'privacy': 'public'}
response = post(post_endpoint, headers=headers, data=payload)