Last active
August 17, 2023 16:47
-
-
Save alaingilbert/5152074 to your computer and use it in GitHub Desktop.
Get your current avatar id.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bot.on 'roomChanged', (data) -> | |
for user in data.users | |
if user.userid == bot.userId | |
console.log user.avatarid | |
break | |
# Equivalent javascript code. | |
bot.on('roomChanged', function(data) { | |
for (i = 0; i < data.users.length; i++) { | |
var user = data.users[i]; | |
if (user.userid == bot.userId) { | |
console.log(user.avatarid); | |
break; | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment