Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

机器人在频道无法使用 #21

Open
paul-sama opened this issue Mar 25, 2024 · 5 comments
Open

机器人在频道无法使用 #21

paul-sama opened this issue Mar 25, 2024 · 5 comments
Labels
question Further information is requested

Comments

@paul-sama
Copy link

机器人开了所有权限,邀请进服务器后,在channels 输入文本消息,机器人无法获取到信息
'_message': [TextSegment(type='text', data={'text': ''})],

@CMHopeSunshine CMHopeSunshine added the question Further information is requested label Mar 25, 2024
@CMHopeSunshine
Copy link
Member

刚经测试,如果消息不@bot的话,Bot收到的消息为空,@bot了才收到正常的消息,目前不知道是不是 Discord 改动了什么权限。

@shininome
Copy link

我今天@bot也收不到消息

@Autuamn
Copy link
Contributor

Autuamn commented Apr 19, 2024

有没有在 Bot 的设置里打开 MESSAGE CONTENT INTENT
image
我不@bot也能收到 content ,不过有时又不行。🤔

log

04-19 11:03:49 [SUCCESS] nonebot | Discord 1208326638673330196 | [GuildMessageCreateEvent]: {'id': 1230715459167453247, 'channel_id': 1208348399263285308, 'author': {'id': 474564749217234954, 'username': 'autuamn_end', 'discriminator': '0', 'global_name': 'Autuamn End', 'avatar': '7a8c1eacb63acfd711543f86244e5572', 'bot': <UNSET>, 'system': <UNSET>, 'mfa_enabled': <UNSET>, 'banner': <UNSET>, 'accent_color': <UNSET>, 'locale': <UNSET>, 'verified': <UNSET>, 'email': <UNSET>, 'flags': <UNSET>, 'premium_type': <UNSET>, 'public_flags': <UserFlags: 0>, 'avatar_decoration': <UNSET>}, 'content': '1股份6njfgh', 'timestamp': datetime.datetime(2024, 4, 19, 3, 3, 51, 53000, tzinfo=TzInfo(UTC)), 'edited_timestamp': None, 'tts': False, 'mention_everyone': False, 'mentions': [], 'mention_roles': [], 'mention_channels': <UNSET>, 'attachments': [], 'embeds': [], 'reactions': <UNSET>, 'nonce': '1230715449038077952', 'pinned': False, 'webhook_id': <UNSET>, 'type': <MessageType.DEFAULT: 0>, 'activity': <UNSET>, 'application': <UNSET>, 'application_id': <UNSET>, 'message_reference': <UNSET>, 'flags': <MessageFlag: 0>, 'referenced_message': None, 'interaction': <UNSET>, 'thread': <UNSET>, 'components': [], 'sticker_items': <UNSET>, 'stickers': <UNSET>, 'position': <UNSET>, 'role_subscription_data': <UNSET>, 'guild_id': 1171294052839333910, 'member': {'user': <UNSET>, 'nick': None, 'avatar': None, 'roles': [1180878026678993048, 1181071825208360960, 1181071750851727442, 1180870446959296533], 'joined_at': datetime.datetime(2023, 11, 7, 3, 44, 23, 842000, tzinfo=TzInfo(UTC)), 'premium_since': None, 'deaf': False, 'mute': False, 'flags': <GuildMemberFlags.COMPLETED_ONBOARDING: 2>, 'pending': False, 'permissions': <UNSET>, 'communication_disabled_until': None}, 'to_me': False, 'reply': None}

@Shedarshian
Copy link

Shedarshian commented May 11, 2024

我也是这样,intent都开了,大部分时候都是必须@才能收到内容,不然content就是空的

测试了一下,可能是机器人必须有缓存才能收到,在刚开启Presence Update这个intent之后,就可以不@就能收到内容,然后重启机器人程序之后就不行了

@lmtivy
Copy link

lmtivy commented Jul 27, 2024

"message_content": true
在配置文件里监听里面加上这一句!整得我都麻了,只有at才能收到信息,加了这一条以后就治好了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants