Skip to content

Commit

Permalink
allow WebClient token to be undefined, fixes slackapi#482
Browse files Browse the repository at this point in the history
  • Loading branch information
aoberoi committed Mar 14, 2018
1 parent 70b2d74 commit 99db715
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/WebClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class WebClient extends EventEmitter {
/**
* Authentication and authorization token for accessing Slack Web API (usually begins with `xoxp`, `xoxb`, or `xoxa`)
*/
public readonly token: string;
public readonly token?: string;

/**
* The base URL for reaching Slack's Web API. Consider changing this value for testing purposes.
Expand Down Expand Up @@ -73,7 +73,7 @@ export class WebClient extends EventEmitter {
/**
* @param token - An API token to authenticate/authorize with Slack (usually start with `xoxp`, `xoxb`, or `xoxa`)
*/
constructor(token: string, {
constructor(token?: string, {
slackApiUrl = 'https://slack.com/api/',
logger = undefined,
logLevel = LogLevel.INFO,
Expand Down

0 comments on commit 99db715

Please sign in to comment.