diff --git a/package.json b/package.json index e11ef0b2..bbe387b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "revolt.js", - "version": "5.0.1-alpha.4", + "version": "5.0.1-alpha.5", "main": "dist/index.js", "repository": "https://gitlab.insrt.uk/revolt/revolt.js", "author": "Paul Makles ", diff --git a/src/index.ts b/src/index.ts index f9185385..d92e4bbb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ export * from './Client'; export { UserPermission, ChannelPermission, ServerPermission } from './api/permissions'; -export const LIBRARY_VERSION = '5.0.1-alpha.4'; +export const LIBRARY_VERSION = '5.0.1-alpha.5'; export const defaultConfig = { apiURL: 'https://api.revolt.chat', diff --git a/src/maps/Users.ts b/src/maps/Users.ts index 4cfec6de..8b989cbc 100644 --- a/src/maps/Users.ts +++ b/src/maps/Users.ts @@ -203,7 +203,7 @@ export default class Users extends Collection { * @returns User */ async fetch(id: string, data?: UserI) { - if (this.has(id)) this.$get(id, data); + if (this.has(id)) return this.$get(id, data); let res = data ?? await this.client.req('GET', `/users/${id}` as '/users/id'); return this.createObj(res); }