Create isBot property in User interface #1

Closed
opened 2026-02-16 12:28:56 -05:00 by yindo · 2 comments
Owner

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.

export interface User {
    isBot: Boolean;
}

So it would be simpler to identify the user type directly by the revolt.js bookstore.

My Revolt Profile: TiaGoiNsaNy

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. ```ts export interface User { isBot: Boolean; } ``` So it would be simpler to identify the user type directly by the `revolt.js` bookstore. My Revolt Profile: `TiaGoiNsaNy`
yindo closed this issue 2026-02-16 12:28:56 -05:00
Author
Owner

@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 isBot and then it'd also need a conversion, I feel like it'd get pretty mess quickly.

Does typeof user.bot === 'object' or typeof user.bot !== 'undefined not suffice? Currently extra bot information is attached for transparency sake and I'd rather not simplify it.

@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 `isBot` and then it'd also need a conversion, I feel like it'd get pretty mess quickly. Does `typeof user.bot === 'object'` or `typeof user.bot !== 'undefined` not suffice? Currently extra bot information is attached for transparency sake and I'd rather not simplify it.
Author
Owner

@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!

@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!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: stoatchat/javascript-client-api#1