Add viewing of other users
This commit is contained in:
parent
5ca047cb3a
commit
0f6e387f30
2 changed files with 5 additions and 3 deletions
|
|
@ -68,7 +68,7 @@ const onHelp = (_text: string, roomId: string) => {
|
||||||
<li><b>!say {text}</b> - Repeats your message</li>
|
<li><b>!say {text}</b> - Repeats your message</li>
|
||||||
<li><b>!bowling {text}</b> - Repeats your message in bowling</li>
|
<li><b>!bowling {text}</b> - Repeats your message in bowling</li>
|
||||||
<li><b>!help</b> - Prints this help message</li>
|
<li><b>!help</b> - Prints this help message</li>
|
||||||
<li><b>!me</b> - Prints your role, level, experience, money and ai cost</li>
|
<li><b>!me / !me {mention}</b> - Prints your role, level, experience, money and ai cost</li>
|
||||||
<li><b>!leaderboard</b> - Prints total user ranking</li>
|
<li><b>!leaderboard</b> - Prints total user ranking</li>
|
||||||
<li><b>!aileaderboard</b> - Prints total user ai cost</li>
|
<li><b>!aileaderboard</b> - Prints total user ai cost</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,10 @@ const registerModuleUser = (
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const onMe = (_text: string, roomId: string, sender: string) => {
|
const onMe = (text: string, roomId: string, sender: string) => {
|
||||||
const user = getUserById(sender);
|
const mention = text.split(" ")[1];
|
||||||
|
|
||||||
|
const user = mention ? getUserById(mention) : getUserById(sender);
|
||||||
const level = getLevel(user.experience);
|
const level = getLevel(user.experience);
|
||||||
|
|
||||||
client.sendHtmlMessage(
|
client.sendHtmlMessage(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue