Public repo of u/wikipedia_answer_bot
Language: Python
Libraries:
- praw (Reddit API)
- mediawikiapi (Wikipedia API)
- tenacity
1. It looks through all the new comments on Reddit in real time using praw.
- What is / What's / What are X?
- Who is/ Who's / Who are X?
- What does X mean?
X is a word / phrase which meanig the comment's author wants to know
Note: If you want the bot to reply to your question, there is no need to write its name, use some specific charcter, etc. You should only ask a question the way it matches these patterns above P.S. I know that the fact you don't have to summon it is bad. But it is also good xD :)
Note: There may be not any artcles matching some exact word or the Wikipedia API is not able to find them for some reason. If this happens, you will just not get a reply.
Also, some words may have a few meanings. In this case, the bot will respond to your comment with a link leading to other links, each of those will contain every separate definiton of an ambiguos word.
You may get an answer which is completely inappropriate to the conversation. This is because the bot can not understand a whole point of the specific comment or even dialog, unfortunately ):
- It writes a felicitation in the end of the comment if it is one of the following holidays today:
- Christmas (Catholic)
- New Year's Eve
- New Year
- Halloween
- You can opt out by using the command
wab opt out
and opt back in withwab opt in
(wab stands for wikipedia answer bot) - You can delete the comment if it has 3 or more downvotes. Command:
wab delete
- There is one joke I don't want to reveal, hehe (you can actually find it in the code)
Hosted on: Heroku
Running since: October, 2020 (I was using another private repo while hosting it)
P.S. @federicotorrielli has been hosting it for a few months and took part in the bot's development
Bot: https://www.reddit.com/user/wikipedia_answer_bot
Bot's subreddit: https://www.reddit.com/r/wikipedia_answer_bot
Thank you for visiting this repo! Hopefully you liked it :)
Always feel free to contribute. Let's make this open source world better ;)