https://github.com/aldrin-labs/rinbot
telegram bot for degens
https://github.com/aldrin-labs/rinbot
algotrading memecoin memefi move sui telegram-bot tgbot
Last synced: 7 months ago
JSON representation
telegram bot for degens
- Host: GitHub
- URL: https://github.com/aldrin-labs/rinbot
- Owner: aldrin-labs
- License: other
- Created: 2024-01-23T00:29:02.000Z (over 1 year ago)
- Default Branch: develop
- Last Pushed: 2024-11-29T09:56:14.000Z (10 months ago)
- Last Synced: 2025-01-16T18:54:16.295Z (9 months ago)
- Topics: algotrading, memecoin, memefi, move, sui, telegram-bot, tgbot
- Language: TypeScript
- Homepage: https://uwu.suki.vi
- Size: 2.26 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
### RINbot on SUI
### Conversations
To create new conversation, you should add your conversationId to `CommonConversationId` (src/chains/conversations.config.ts)
Secondly, you should add version of your conversation into conversations config `conversations` (src/middleware/conversations/config.ts)You must update the conversation version in conversations config each time when you do the changes to the conversation interface, otherwise it might lead to the unexpected behaviour for users' who were using the previous conversation version.
You must use the `enterConversation` method instead of `conversation.enter`.
This rule exists because `enterConversation` method saves the current version of conversation that the user entered in the user's session data (`activeConversation`).The conversations version check middleware (src/middleware/conversation-version-check.ts) allows to check the conversation version each time when user interact with the bot. It compares the current version of user's conversation and the conversation version in config, and in case user is using the outdated (old) conversation version, it would forcibly close сonversation.
This conversation version check middleware exists to prevent cases when:
1. Coversation interface changed
2. User already entered conversation with old interfaceWithout the conversation version check middleware, user would stuck forever in the conversation without ability to do anything in the bot itself.