mirror of
https://github.com/stoatchat/javascript-client-api.git
synced 2026-07-18 16:14:27 -04:00
Create isBot property in User interface #1
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tiagoryandev on GitHub (Sep 16, 2021).
It would be a great idea to create one more property in the User interface, where it returns a Boolean value to check if the user is a bot.
So it would be simpler to identify the user type directly by the
revolt.jsbookstore.My Revolt Profile:
TiaGoiNsaNy@insertish commented on GitHub (Sep 17, 2021):
The User objects typically come straight from the database and this change would ideally require duplicating the User struct to add
isBotand then it'd also need a conversion, I feel like it'd get pretty mess quickly.Does
typeof user.bot === 'object'ortypeof user.bot !== 'undefinednot suffice? Currently extra bot information is attached for transparency sake and I'd rather not simplify it.@elementh commented on GitHub (Sep 17, 2021):
I'm with @insertish in this one; I think the current bot object is good enough, for example in the dotnet SDK I'm preparing I just default it to false if not present and that's about it!