Skip to content

Commit

Permalink
v1.1.9 - discrim support
Browse files Browse the repository at this point in the history
  • Loading branch information
itzTheMeow committed Sep 16, 2023
1 parent 934bc64 commit c700745
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 6 deletions.
8 changes: 8 additions & 0 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
v1.1.9

- Added `User.discriminator`, `User.tag`, and `User.displayName`.

v1.1.8

- Added `joinCall()` to `DMChannel` and `GroupDMChannel`.

v1.1.7

- Added `toString()` methods to objects.
Expand Down
4 changes: 2 additions & 2 deletions core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "revkit",
"version": "1.1.8",
"version": "1.1.9",
"description": "An alternative to revolt.js that aims to be familiar to use.",
"main": "dist/cjs/index.js",
"module": "dist/es6/index.js",
Expand Down Expand Up @@ -30,7 +30,7 @@
"form-data": "^4.0.0",
"long": "^5.2.1",
"luxon": "^3.3.0",
"revolt-api": "^0.5.5-5",
"revolt-api": "^0.6.7",
"ulid": "^2.3.0"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions core/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions core/src/objects/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,23 @@ export class User extends BaseObject<APIUser> {
constructor(client: Client, data: APIUser) {
super(client, data);
}
/** Username for this user. */
public get username() {
return this.source.username;
}
/** Four-digit discrimator for this user. */
public get discriminator() {
return this.source.discriminator;
}
/** Full tag for this user. (username#discriminator) */
public get tag() {
return this.username + "#" + this.discriminator;
}
/** This user's display name. (if any) */
public get displayName() {
return this.source.display_name;
}
/** If this user is a bot, their bot information. */
public get bot() {
return this.source.bot ? new Bot(this) : null;
}
Expand Down

0 comments on commit c700745

Please sign in to comment.