Class: Participant
Represents a chat participant / user in the Arattai system. Each participant has a display name and a zone user ID (ZUID).
Source: src/Types/Participant.js
Constructor
new Participant(dname, zuid)
- dname
string— Display name of the user.- zuid
string— Zone user ID.
Properties
| Property | Type | Description |
|---|---|---|
dname | string | Display name |
zuid | string | Zone user ID |
Methods
getDname()
method
getDname(): string
Returns the participant's display name.
getZuid()
method
getZuid(): string
Returns the participant's zone user ID.
const chats = await bot.fetchChats();
for (const [id, chat] of Object.entries(chats)) {
const owner = chat.getOwner();
console.log(`Chat: ${chat.title}`);
console.log(`Owner: ${owner.getDname()} (${owner.getZuid()})`);
for (const p of chat.getParticipants()) {
console.log(` - ${p.getDname()} (${p.getZuid()})`);
}
}