8000 用户bot (user-bot / self-bot) 无法获取消息的content · Issue #10 · Snapmali/discord-monitor · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

用户bot (user-bot / self-bot) 无法获取消息的content #10

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 8000 terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
An9el0baby opened this issue May 4, 2021 · 8 comments
Closed

用户bot (user-bot / self-bot) 无法获取消息的content #10

An9el0baby opened this issue May 4, 2021 · 8 comments
Labels
bug Something isn't working

Comments

@An9el0baby
Copy link

discord 好像更新了用户的token
无法获取其他人发送的mesage的content
请问有方法解决吗?

@Snapmali Snapmali changed the title 求助 用户bot (selfbot) 无法获取消息的content May 4, 2021
@Snapmali Snapmali added the bug Something isn't working label May 4, 2021
@Snapmali Snapmali changed the title 用户bot (selfbot) 无法获取消息的content 用户bot (user-bot / self-bot) 无法获取消息的content May 4, 2021
@Snapmali
Copy link
Owner
Snapmali commented May 4, 2021

应该是4月30日discord对api做了某种修改所致,而目前discord.py库已不再为selfbot的问题提供维护与帮助,甚至将在未来的v2.0版本直接移除对selfbot的支持,相关讨论可参见Rapptz/discord.py#6839
而我这里只能考虑针对selfbot的情形迁移依赖库,目前正在考虑的选项为Discord-S.C.U.M
由于本人的精力及能力所限,不排除脚本最终直接放弃对用户bot的支持的可能性,敬请谅解

@An9el0baby
Copy link
Author

好的 感谢您及时回答!

@tom-snow
Copy link
tom-snow commented Mar 19, 2022

https://github.com/dolfies/discord.py-self

感觉这个好像可以,不过本项目不能简单通过修改 discord.py 依赖库为 discord.py-self 来用

@luoyeETH
Copy link

https://github.com/dolfies/discord.py-self

感觉这个好像可以,不过本项目不能简单通过修改 discord.py 依赖库为 discord.py-self 来用

这个确实可以,改为discord.py-self后,修改一下就可以运行用户bot了

@costard06
Copy link

https://github.com/dolfies/discord.py-self
感觉这个好像可以,不过本项目不能简单通过修改 discord.py 依赖库为 discord.py-self 来用

这个确实可以,改为discord.py-self后,修改一下就可以运行用户bot了

请问luoye大佬 依赖库改为discord.py-self后,需要修改哪个地方的代码才能实现on_message获取content?请指教🙏

@luoyeETH
Copy link
luoyeETH commented May 5, 2022

https://github.com/dolfies/discord.py-self
感觉这个好像可以,不过本项目不能简单通过修改 discord.py 依赖库为 discord.py-self 来用

这个确实可以,改为discord.py-self后,修改一下就可以运行用户bot了

请问luoye大佬 依赖库改为discord.py-self后,需要修改哪个地方的代码才能实现on_message获取content?请指教🙏

作者原代码中既支持bot也支持self-bot,修改后需要将DiscordMonitor.py

dc.run(config["token"], bot=config["bot"])

修改为

dc.run(config["token"])

之后可能运行时还会有字符串拼接的报错,再自行修改一下就行。

log_text = '%s: ID: %d. Username: %s. Server: %s. Channel: %s. Content: %s%s' % \
                   (status, message.author.id,
                    message.author.name + '#' + message.author.discriminator,
                    message.guild.name, message.channel.name, message.content, attachment_log)

可能是上面这部分代码,记不太清了

@Snapmali
Copy link
Owner
Snapmali commented May 8, 2022

已经引入discord.py-self解决问题,请详阅readme中外部依赖库进行处理。

@Snapmali Snapmali closed this as completed May 8, 2022
@Snapmali Snapmali pinned this issue May 8, 2022
@ferrenlove
Copy link

感谢美女、帅哥作者

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants
0