RcGcDw/README.md

53 lines
4.1 KiB
Markdown
Raw Normal View History

2018-06-15 13:56:35 +00:00
## Overview ##
Recent changes Gamepedia compatible Discord webhook is a project made from earlier recent changes module of FriskBot. It has been remade as independent script for public usage.
2018-06-17 12:39:22 +00:00
### Dependencies ###
2018-06-18 21:31:53 +00:00
* **Python 3.6>**
2018-06-17 12:39:22 +00:00
* requests 2.18.4>
2018-06-18 21:31:53 +00:00
* beautifulsoup 4.6.0>
* lxml 4.2.1>
2018-06-21 23:35:24 +00:00
* schedule 0.5.0>
2018-06-17 12:39:22 +00:00
2018-06-15 13:56:35 +00:00
### Features ###
* Fetch recent changes from Gamepedia wiki and send them to Discord channel using a webhook
* Send day overview, that lists how active was the wiki this day
* Customable with many different settings
* Can support multiple languages
### settings.json ###
Explanation for settings:
`cooldown` interval for how often changes are retrieved from the wiki (due to used solutions, the real interval is ~1 sec longer)
`wiki` wiki prefix the bot is supposed to work with (for example, for English Minecraft Wiki it's minecraft (https://**minecraft**.gamepedia.com) and for Polish Minecraft Wiki minecraft-pl (https://**minecraft-pl**.gamepedia.com
2018-06-18 22:13:24 +00:00
`lang` language for the messages, currently available options are: de, en, pl
2018-06-15 13:56:35 +00:00
`header` it's recommended to leave this value as it is, it's a header the script will use to communicate with Gamepedia. Please note that without it, no communication will be possible.
`limit` amount of actions retrieved every `cooldown` amount of seconds. The higher it is the more network data will be used and the data will be processed longer, setting it to higher values is not recommended, but if you want to make sure no edit is omitted (which only happen if there are more actions in last `cooldown` seconds than this value).
2018-06-18 22:13:24 +00:00
`webhookURL` webhook URL you can get using [channel settings in Discord](https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks)
2018-06-17 12:57:06 +00:00
`limitrefetch` limit of how many changes can be retrieved when refetch happens, cannot be lower than limit. -1 if you want to disable auto-refetch
`wikiname` a name of the wiki the bot will work on, required in some messages
`avatars` this section makes specific types of messages overwrite the default webhook avatar
2018-06-18 15:26:03 +00:00
* `connection_failed` message printed when script fails connection with the wiki several times
* `no_event` error message when the event couldn't be recognized by the script
2018-06-18 21:31:53 +00:00
* `embed` every embed message showing changes
2018-06-18 15:26:03 +00:00
`verbose_level` a number (min 0, max 50) identifying the type of messages that will be written into the console. (CRITICAL 50, ERROR 40, WARNING 30, INFO 20, DEBUG 10)
2018-06-18 22:13:24 +00:00
`show_updown_messages` bool value, depending on this settings the messages whenever the wiki goes up and down will be sent to the channel
`appearience` section with different types of actions and logs, and corresponding to them colors/icons. In here you can set custom icon or color!
2018-06-17 12:39:22 +00:00
### How to use ###
Make sure you have installed all of dependencies and filled settings.json properly.
When you are sure, use `python rcgcdw.py` command to run the script.
2018-06-18 22:13:24 +00:00
#### Free (?) hosting ####
If you want I can host the script for you for free. Just [contact me](https://minecraft.gamepedia.com/User:Frisk#Contact). If you want to go with this option, be aware that this is far from the best option, I host all of the scripts on my Raspberry PI, it can go down at any moment, I try to keep every script running, but obviously sometimes it's just not possible. So, choosing this option, don't expect 100% uptime.
2018-06-18 15:26:03 +00:00
### Credits ###
2018-06-18 22:13:24 +00:00
* Minecraft Wiki English Discord server community, most notably Jack McKalling for input on how the script should work, especially formatting and what information should be there
2018-06-18 15:26:03 +00:00
Translators:
* MarkusRost for German translation
### Other ###
2018-06-18 22:13:24 +00:00
Script seem to use about 17MB of RAM and negligible amount of CPU when fetching changes.
Script does not log bot actions by default.
"I GoT "Unable to process the event" mESSage!!! WHaT HApND?" - it means there is some kind of action that does not have a template in the script, please [create a ticket](https://gitlab.com/piotrex43/RcGcDw/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=) with information on what wiki this error ocurred and when.