我在Discord上编写了我的第一个机器人。
我使用JDA-3.8.1_454-withDependencies.jar
我尝试从here运行示例:
这是一个复制/粘贴,我将令牌添加到代码中。 登录成功,但出现此错误:
[main] INFO JDA - Login Successful!
[JDA MainWS-WriteThread] INFO WebSocketClient - Connected to WebSocket
[JDA MainWS-ReadThread] ERROR WebSocketClient - Got an unexpected error. Please redirect following message to the devs:
GUILD_CREATE -> {"default_message_notifications":0,"unavailable":false,"owner_id":"427213800953872415","lazy":true,"roles":[{"color":0,"permissions":104324161,"managed":false,"name":"@everyone","mentionable":false,"position":0,"id":"535169332288946186","hoist":false},{"color":0,"permissions":8,"managed":true,"name":"JRoll Bot","mentionable":false,"position":1,"id":"535178195046105099","hoist":false}],"icon":null,"system_channel_id":"535169332288946188","afk_timeout":300,"features":[],"presences":[{"game":null,"client_status":{"desktop":"idle"},"activities":[],"user":{"id":"427213800953872415"},"status":"idle"},{"game":null,"client_status":{"web":"online"},"activities":[],"user":{"id":"534919677613441045"},"status":"online"}],"afk_channel_id":null,"members":[{"joined_at":"2019-01-16T18:51:51.785000+00:00","roles":[],"deaf":false,"mute":false,"user":{"id":"427213800953872415","avatar":"32d4e5ccb10aad2b4778a9bb71b9f3f5","username":"Hugues","discriminator":"8555"}},{"joined_at":"2019-01-16T18:51:51.785000+00:00","roles":[],"deaf":false,"mute":false,"user":{"id":"427213800953872415","avatar":"32d4e5ccb10aad2b4778a9bb71b9f3f5","username":"Hugues","discriminator":"8555"}},{"nick":null,"joined_at":"2019-01-16T19:27:04.838700+00:00","roles":["535178195046105099"],"deaf":false,"mute":false,"user":{"bot":true,"id":"534919677613441045","avatar":null,"username":"JRoll Bot","discriminator":"3424"}}],"voice_states":[{"self_deaf":false,"user_id":"427213800953872415","deaf":false,"session_id":"8d7b04da746f3cf9281bfeebc418fbf1","mute":false,"suppress":false,"self_video":false,"self_mute":false,"channel_id":"535169332288946190"}],"id":"535169332288946186","member_count":2,"emojis":[],"large":false,"application_id":null,"joined_at":"2019-01-16T19:27:04.838700+00:00","verification_level":0,"explicit_content_filter":0,"channels":[{"permission_overwrites":[],"nsfw":false,"parent_id":null,"name":"Salons textuels","position":0,"id":"535169332288946187","type":4},{"permission_overwrites":[],"last_message_id":"535178254001111040","nsfw":false,"rate_limit_per_user":0,"parent_id":"535169332288946187","name":"général","topic":null,"position":0,"id":"535169332288946188","type":0},{"permission_overwrites":[],"nsfw":false,"parent_id":null,"name":"Salons vocaux","position":0,"id":"535169332288946189","type":4},{"permission_overwrites":[],"nsfw":false,"parent_id":"535169332288946189","name":"Général","bitrate":64000,"position":0,"id":"535169332288946190","user_limit":0,"type":2}],"name":"Test Bot","mfa_level":0,"region":"us-east","splash":null}
java.time.DateTimeException: Unable to obtain Instant from TemporalAccessor: {OffsetSeconds=0},ISO resolved to 2019-01-16T18:51:51.785 of type java.time.format.Parsed
机器人保持运行,但不响应频道中的消息。 这是我的第一个机器人,所以可能是初学者的错误。
有人可以引导我寻找方向吗?谢谢。