Add viewing of other users

This commit is contained in:
Aslan 2025-12-28 17:43:14 +01:00
parent 5ca047cb3a
commit 0f6e387f30
2 changed files with 5 additions and 3 deletions

View file

@ -68,7 +68,7 @@ const onHelp = (_text: string, roomId: string) => {
<li><b>!say {text}</b> - Repeats your message</li>
<li><b>!bowling {text}</b> - Repeats your message in bowling</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>!aileaderboard</b> - Prints total user ai cost</li>
</ul>

View file

@ -26,8 +26,10 @@ const registerModuleUser = (
});
};
const onMe = (_text: string, roomId: string, sender: string) => {
const user = getUserById(sender);
const onMe = (text: string, roomId: string, sender: string) => {
const mention = text.split(" ")[1];
const user = mention ? getUserById(mention) : getUserById(sender);
const level = getLevel(user.experience);
client.sendHtmlMessage(