到目前为止我的管理员代码:
var admin = '76561198109313437';
var chatter;
bot.on('message', function(source, message, type, chatter) {
// respond to both chat room and private messages
if (message == 'dota2' && chatter == admin) {
console.log("Now playing DotA2");
bot.gamesPlayed([570]);
}
});
我希望游戏仅针对管理员steamid
进行更改,但是通过此设置,任何人都无法更改它。我怎么能这样做?
答案 0 :(得分:0)
bot.on('message', function(source, message, type, chatter) {
// respond to both chat room and private messages
if(message == 'dota2' && source == admin) {
console.log("Now playing DotA2");
bot.gamesPlayed([570]);
}
});
喋喋不休是问题所在,我应该将值设置为源而不是聊天。