如何使我的自机器人从配置文件中获取令牌,而不是将令牌放入代码中?
bot.run(“ token”,bot = false)
如何更改它以从config.json中获取令牌?
bot.run("TOKEN", bot=False)
How do I change that to grab the token from the config.json?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是读取JSON文件的功能:
您可以了解有关JSON 在这里
您可以可以,您可以可以在此处使用:
您的JSON文件应该是这样:
Here's a function to read json files:
You can learn more about json here
Then you can use that in here:
Your json file should be like this: