Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Commit

Permalink
feat: alt, bot, supporter fields in user object
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemmmy committed Mar 27, 2023
1 parent a6a1ce5 commit 2650f33
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,11 @@ The user object represents an in-game player.
- `minecraft:the_nether` - The Nether
- `minecraft:the_end` - The End
- afk - If the player is AFK
- alt - If the player is an alt account
- bot - If the player is a bot
- supporter - the current public tier of the player's supporter status. This will be `0` if the player is not a
supporter or has opted out of showing their supporter tag, `1` for a Tier 1 supporter, `2` for a Tier 2 supporter, and
`3` for a Tier 3 supporter.

### DiscordUser object

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "switchchat",
"version": "3.1.3",
"version": "3.1.4",
"description": "Framework for the SwitchCraft Chatbox v2",
"main": "dist/index.js",
"types": "types/index.d.ts",
Expand Down
13 changes: 13 additions & 0 deletions src/types/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,17 @@ export interface User {

/** Whether the player is currently AFK. */
afk?: boolean;

/** Whether the player is an alt account. */
alt: boolean;

/** Whether the player is a bot account. */
bot: boolean;

/**
* The current public tier of the player's supporter status. This will be `0` if the player is not a supporter or
* has opted out of showing their supporter tag, `1` for a Tier 1 supporter, `2` for a Tier 2 supporter, and `3` for
* a Tier 3 supporter.
*/
supporter: number;
}

0 comments on commit 2650f33

Please sign in to comment.