command
Version:
v0.1.0-alpha
Opens a new window with list of versions in this module.
Published: Feb 28, 2025
License: Unlicense
Opens a new window with license information.
Imports: 19
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Talking Bots is a just for fun example where we have 2 zulip bots sending
messages to each other in a silly conversation.
This example is using the Users, Channels, Messages and Realtime Services.
Outline:
- Initiate client with User A credentials
- Initiate client with User B credentials
- Create necessary services for each one (users, channels, messages and realtime)
- Start a goroutine for each one where:
- They will subscribe to a fixed Channel (#talking_bots)
- They will register an Event Queue to only receive notifications on the
subscribed channel.
- They will start sending messages to the channel mentioning or not
the other user.
- They will react or not to the other user messages with another message,
a reaction or sending a picture.
Running the example:
- Get 2 user credentials
- You can run
examples/create_users
to generate 2 random users or create 2 bots
- Export the variables
export ZULIP_EMAIL_A="johndoe-bot@localhost"
export ZULIP_API_KEY_A="xxxxxxxxxxxxxxx"
export ZULIP_EMAIL_B="janedoe-bot@localhost"
export ZULIP_API_KEY_B="yyyyyyyyyyyyyyy"
go run .
- Join the channel where the 2 users will talk at https://localhost
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.