Jump to content
McKay Development

Recommended Posts

Posted (edited)

I'm trying to send a message in the first room but it's returning an error, probably the chatId is wrong, how to find my "Principal" chatId?

bot.on('groupList', () => {
      console.log(Object.keys(bot.myGroups )[ 0 ])
      bot.chat.sendChatMessage( '103582791471570174' , '0' , "hello") })

image.thumb.png.64ea44f8b7eac38da14e7befe56b9d3c.png
image.thumb.png.6610a8aef5cc3df72fdcf12cd4458a5f.png

Edited by daeragon
Posted (edited)

The error is AccessDenied. Sounds like you don't have access to that group chat.

But also that looks like the output your first code should produce. Did you run the wrong file?

Edited by Dr. McKay
Posted (edited)
5 minutes ago, Dr. McKay said:

The error is AccessDenied. Sounds like you don't have access to that group chat.

Hooo, maybe it's because I created the group with another account? It's weird because I gave ADM to the bot account.

🤔 Strange, I tested it on the other account that I created the group and it gave the same result.
image.thumb.png.933eb74f9fc30a51cac676fd563c87c1.png

Edited by daeragon
Posted
6 minutes ago, Dr. McKay said:

That's the same error and console output that your first code should produce. Did you run the wrong file or not save it?

on my other account 🤔
image.thumb.png.77baf5c157c1e90463da49033b87bc4d.png

Posted

I don't know why you'd only be getting that data. Here's the response I got to the same exact call:

{
  chat_group_summary: {
    chat_rooms: [ [Object] ],
    top_members: [ [SteamID], [SteamID] ],
    role_ids: [],
    role_actions: [],
    party_beacons: [],
    chat_group_id: '22328242',
    chat_group_name: 'Price Bot',
    active_member_count: 2,
    active_voice_member_count: 0,
    default_chat_id: '78507305',
    clanid: SteamID { universe: 1, type: 7, instance: 0, accountid: 42048766 },
    chat_group_tagline: '"IN DEVELOPMENT..."',
    chat_group_avatar_sha: null,
    rank: null,
    default_role_id: null,
    appid: null,
    watching_broadcast_channel_id: '0',
    active_minigame_id: null,
    avatar_ugc_url: null,
    disabled: null,
    steamid_owner: null,
    chat_group_avatar_url: null,
    watching_broadcast_steamid: null
  }
}

Maybe your account is limited and limited accounts don't have all the data returned to them? Maybe you need to update steam-user?

Posted (edited)

YEAAAAAAH!!!! GG, thanks for help @Dr. McKay! ❤️ 
I was wrong in the return of the callback :P

image.png.28bdf04ace0822755c281252e44a85a1.png
image.thumb.png.250f2c59cbbe5396fecc869e091d0b61.png

But the error persists... :( 
image.thumb.png.3bda4f6b43592bbea26129497f1cef54.png

ATT:
I achieved! I got the correct ID group returned by the response and it is now working normally.
Thanks @Dr. McKay
image.png.80704f359cdd717da83f5c6ee8c7aa08.png
 image.png.c4e12d14c5352380ac1221eaa3f4e76c.png

Edited by daeragon

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...