Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface InitializeOptions

Hierarchy

  • InitializeOptions

Index

Properties

Optional app

app: Express

You can use an existing Express instance

Note: initialize() will change the view engine to ejs Note: initialize() will add the cookieParser middelware

Optional beforeRouteSetup

beforeRouteSetup: (app: Express) => void

This hook gets called before the routes are added to the express app

Type declaration

    • (app: Express): void
    • Parameters

      • app: Express

      Returns void

Optional listen

listen: boolean

Only relevant when an express app is provided using InitializeOptions.app, Bind passed express app to env.PORT

default

true

Optional scopes

scopes: string[]

Ask the streamer for more permissions, you can recieve the token using the boilerplate events

More on scopes: https://dev.twitch.tv/docs/authentication#scopes

example
const { client, boilerplate } = await initialize({
 scopes: ['channel:read:hype_train', 'user:read:email']
});

boilerplate.on('join', async ({ authData, basicProfile }) => {
  await sendVerificationEmail(basicProfile.email);
  addListenerForHypeTrain(authData.access_token);
})

Optional tmiOptions

tmiOptions: TmiOptions

You can override the default options the tmi.js client is initialized with using this object. Your options will be merged with the default.

Generated using TypeDoc