winston-yallow / godot-discord-bot

Small bot written for the Godot discord server
MIT License
3 stars 2 forks source link

Check if the class name for `/class` exists #9

Open winston-yallow opened 9 months ago

winston-yallow commented 9 months ago

This should make a web request to the docs and see if it returns code 404. In that case an ephemeral warning should be shown, otherwise the link with a short summary.

This issue should only be implemented after #8 is done to prevent sending too many web requests. Alternatively, results should be cached for some time.

winston-yallow commented 9 months ago

This can also include fuzzy matching. For that we would need to update the list of available classes from time to time (maybe a few times per day). That way users can enter "node 2d" to mean "Node2D".

Xananax commented 9 months ago

The list of classes is on the Godot repo, so we could just take it from there. In the future, we could ask Godot to have a trigger/webhook that rebuilds the bot.