Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: typos / grammar corrections #2367

Merged
merged 3 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/api/layers/host.layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ export class HostLayer {
}

/**
* Retrieves the connecction state
* Retrieves the connection state
* @category Host
*/
public async getConnectionState(): Promise<SocketState> {
Expand Down
38 changes: 19 additions & 19 deletions src/api/layers/listener.layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,28 +397,28 @@ export class ListenerLayer extends ProfileLayer {
}

/**
* @event Listens to messages acknowledgement Changes
* @event Listens to message acknowledgement changes
* @returns Disposable object to stop the listening
*/
public onAck(callback: (ack: Ack) => void) {
return this.registerEvent(ExposedFn.onAck, callback);
}

/**
* Escuta os eventos de Localização em tempo real de todos os chats
* @event Eventos de Localização em tempo real
* @param callback Função para ser executada quando houver alterações
* @returns Objeto descartável para parar de ouvir
* Listens to real-time location events of all chats
* @event Real-time location events
* @param callback Function to be executed when changes are made
* @returns Disposable object to stop listening
*/
public onLiveLocation(callback: (liveLocationEvent: LiveLocation) => void): {
dispose: () => void;
};
/**
* Escuta os eventos de Localização em tempo real
* @event Eventos de Localização em tempo real
* @param id Único ID ou lista de IDs de contatos para acompanhar a localização
* @param callback Função para ser executada quando houver alterações
* @returns Objeto descartável para parar de ouvir
* Listens to location events in real time
* @event Location events in real time
* @param id Unique ID or list of contact IDs to track location
* @param callback Function to be executed when changes are made
* @returns Disposable object to stop listening
*/
public onLiveLocation(
id: string | string[],
Expand Down Expand Up @@ -451,17 +451,17 @@ export class ListenerLayer extends ProfileLayer {
}

/**
* @event Listens to participants changed
* @param to callback
* @event Listens to participant changes
* @param callback Function to be executed when participant changes occur
* @returns Stream of ParticipantEvent
*/
public onParticipantsChanged(callback: (evData: ParticipantEvent) => void): {
dispose: () => void;
};
/**
* @event Listens to participants changed
* @param to group id: xxxxx-yyyy@us.c
* @param to callback
* @event Listens to participant changes in a certain group
* @param groupId xxxxx-yyyy@us.c
* @param callback Function to be executed when participant changes occur
* @returns Stream of ParticipantEvent
*/
public onParticipantsChanged(
Expand Down Expand Up @@ -520,8 +520,8 @@ export class ListenerLayer extends ProfileLayer {
callback: (presenceChangedEvent: PresenceEvent) => void
): { dispose: () => void };
/**
* Listens to presence changed, the callback will triggered only for passed IDs
* @event Listens to presence changed
* Listens to presence changes, the callback will triggered only for passed IDs
* @event Listens to presence changes
* @param id contact id (xxxxx@c.us) or group id: xxxxx-yyyy@g.us
* @param callback Callback of on presence changed
* @returns Disposable object to stop the listening
Expand Down Expand Up @@ -600,7 +600,7 @@ export class ListenerLayer extends ProfileLayer {
}

/**
* @event Listens to revoked messages
* @event Listens to message revocation
* @returns Disposable object to stop the listening
*/
public onRevokedMessage(
Expand All @@ -616,7 +616,7 @@ export class ListenerLayer extends ProfileLayer {
}

/**
* @event Listens to reaction messages
* @event Listens to message reactions
* @returns Disposable object to stop the listening
*/
public onReactionMessage(
Expand Down
15 changes: 7 additions & 8 deletions src/api/model/get-messages-param.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,25 @@
*/

/**
* Parâmetros para retorno de mensagens
* Parameters for returning messages
*/
export interface GetMessagesParam {
/**
* Quantidade de mensagens para retornar
* informar `-1` para trazer tudo (Pode demorar e travar a interface)
* Number of messages to return.
* Set it to `-1` to return everything (may take a while and crash the interface).
*
* @default 20
*/
count?: number;
/**
* ID da última mensagem para continuar a busca
* Isso funciona como paginação, então ao pegar um ID,
* você pode utilizar para obter as próximas mensagens a partir dele
* ID of the last message to continue the search.
* This works like pagination, so when you get an ID,
* you can use it to get the next messages from it.
*/
id?: string;
fromMe?: boolean;
/**
* Se você deseja recuperar as mensagems antes(before) ou depois(after)
* do ID informado.
* Whether you want to retrieve the messages before or after the ID entered.
*
* @default 'before'
*/
Expand Down
2 changes: 1 addition & 1 deletion src/api/model/initializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface CreateOptions extends CreateConfig {
/**
* You must pass a string type parameter, this parameter will be the name of the client's session. If the parameter is not passed, the section name will be "session".
*/
session: string;
session?: string;
/**
* A callback will be received, informing the status of the qrcode
*/
Expand Down
10 changes: 5 additions & 5 deletions src/api/whatsapp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class Whatsapp extends BusinessLayer {

/**
* Download and returns the media content in base64 format
* @param messageId Message ou id
* @param messageId Message or id
* @returns Base64 of media
*/
public async downloadMedia(messageId: string | Message): Promise<string> {
Expand Down Expand Up @@ -131,7 +131,7 @@ export class Whatsapp extends BusinessLayer {
}

/**
* Logout WhatsApp
* Log out of WhatsApp
* @returns boolean
*/
public async logout() {
Expand Down Expand Up @@ -174,7 +174,7 @@ export class Whatsapp extends BusinessLayer {
}

/**
* Get message by id
* Get a message by its ID
* @param messageId string
* @returns Message object
*/
Expand Down Expand Up @@ -203,7 +203,7 @@ export class Whatsapp extends BusinessLayer {
/**
* Decrypts message file
* @param message Message object
* @returns Decrypted file buffer (null otherwise)
* @returns Decrypted file buffer (`null` otherwise)
*/
public async decryptFile(message: Message) {
const mediaUrl = message.clientUrl || message.deprecatedMms3Url;
Expand All @@ -212,7 +212,7 @@ export class Whatsapp extends BusinessLayer {

if (!mediaUrl)
throw new Error(
'message is missing critical data needed to download the file.'
'message is missing critical data (`mediaUrl`) needed to download the file.'
);
let haventGottenImageYet = true;
let res: any;
Expand Down
Loading