> For the complete documentation index, see [llms.txt](https://violetxf.gitbook.io/messengerbot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://violetxf.gitbook.io/messengerbot/api2/sessionmanager.md).

# SessionManager

SessionManager는 [Event.NOTIFICATION\_POSTED](/messengerbot/api2/event.md)의 리스너에 전달되는 인자로, 채팅방 세션을 메신저봇 앱에 수동으로 등록할 수 있게 해주어 메신저봇이 공식적으로 지원하지 않는 메신저 앱을 사용할 때 활용할 수 있습니다.

| Public methods |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Boolean        | <p><strong>bindSession(packageName: String, room: String, action: Notification.Action = null)</strong></p><p><code>packageName</code>이라는 메신저 앱의 <code>room</code>채팅방에 대해 메시지 전송 액션인 <code>action</code>을 할당합니다.</p><p>이렇게 하면 <a href="/messengerbot/api2/bot.md">Bot#send</a>, <a href="/messengerbot/api2/event.md#message">msg#reply</a>등을 사용할 수 있게 됩니다.</p><p><code>action</code>이 <code>null</code>일 경우 메신저봇이 자동 분석한 답장 액션을 사용합니다.</p><p><code>action</code>이 <code>null</code>이고, 메신저봇이 자동 분석한 답장 액션 또한 <code>null</code>일 경우 <code>false</code>를 반환하며, 그 외에는 <code>true</code>를 반환합니다.</p> |
| Boolean        | <p><strong>bindSession(room: String, action: Notification.Action = null)</strong></p><p>위 메서드와 동작 방식은 같지만, <code>packageName</code>을 메신저봇이 자동 분석합니다.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                         |
