medallyon / grogsile.org-archive

The (old) Official Bot For ESO International
https://discordapp.com/invite/0jGipOeWW06jNmlL
Apache License 2.0
1 stars 0 forks source link

Rework 'wiki' command #34

Closed medallyon closed 7 years ago

medallyon commented 7 years ago
whisperity commented 7 years ago

I added a bullet point about better name handling. Maybe it's related to #36 in its inner workings, or at least the guildelines on how resolution should work.

dachendev commented 7 years ago

Moved to Discord Bot under projects. Marked the "wiki" command as "under review" due to the chance it may not be completed as planned.

medallyon commented 7 years ago

For the second point, I believe that Rich Embeds should contain information based on the type of article it's pulling data from. This is indeed easier said than done, since different editors at the UESP wiki have different designs, making it harder to pull information from them than if everything had the same layout.

The WikiMedia API does not help in this regard, since it only returns whole articles in HTML format.

The best thing we can do, really, is to take the "category" of an article (dtcpzhb 1) and try to stylize the Rich Embed according to that.

medallyon commented 7 years ago

I understand that with this rework comes a very weird bug that is manifested on several /wiki articles. What I have noticed while console.loging the HTML that was requested via request was that the body seemed 'corrupt'. Passing this body through internal functions would throw errors like:

TypeError: Cannot read property 'replace' of null

This is quite frustrating, but while maintaining this module, I will try to get a hold on a fix for this bug. I think it might have to do something with the Tes3Mods:Tamriel Rebuilt namespace.