Answer the question
In order to leave comments, you need to log in
How to make the bot send a specific emoji?
How to make the bot with the Online command send in response not only the names of the participants, but also the emoji corresponding to the platform with which the participant is currently online?
Answer the question
In order to leave comments, you need to log in
when getting the participants of the conversation using the messages.getConversationMembers method , pass the fields=last_seen parameter,
create an object in which the platform identifiers will be the keys (the full list can be found here , the last_seen field), and the desired emoticons will be the values
const smiles = {
1: 'smile for mobile version',
2: 'smile for iPhone',
// ...
};
function getSmile(user) {
return smiles[user.last_seen.platform];
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question