Represents a account user.

### Hierarchy

- User

## Index

### Constructors

- constructor

### Properties

- api
- channels
- name

### Methods

- getChannelByName
- send

## Constructors

### constructor

- new User(api: HackmudApi, name: string, channels: Channel[]): User

- - Defined in lib/user.ts:16

  #### Parameters

  - ##### api: HackmudApi

  - ##### name: string

  - ##### channels: Channel[]

  #### Returns User

## Properties

### Private api

api: HackmudApi

- Defined in lib/user.ts:16

### channels

channels: Channel[]

- Defined in lib/user.ts:15

The channels this user has joined.

### name

name: string

- Defined in lib/user.ts:11

The name of the user.

## Methods

### getChannelByName

- getChannelByName(name: string): Channel

- - Defined in lib/user.ts:28

  Returns the user channel from the given name.

  #### Parameters

  - ##### name: string

    The channel name.

  #### Returns Channel

### send

- send(user: string, msg: string): Promise<void>

- - Defined in lib/user.ts:37

  Send a message to another user.

  #### Parameters

  - ##### user: string

    The user to send the message to.

  - ##### msg: string

    The content of the message.

  #### Returns Promise<void>

Generated using TypeDoc