weixin_39846191 2020-11-30 10:49
浏览 0

Use configs for JDA constructor

Pull Request Etiquette

Changes

  • [x] Internal code
  • [ ] Library interface (affecting end-user code)
  • [ ] Documentation
  • [ ] Other: _____

Closes Issue: NaN

Description

This drastically improves the readability and usability of the JDAImpl constructor. ~~I plan to do~~ I have done the same for the DefaultShardManager constructor ~~later~~.

该提问来源于开源项目:DV8FromTheWorld/JDA

  • 写回答

5条回答 默认 最新

  • weixin_39846191 2020-11-30 10:49
    关注

    I believe it would be reasonable to allow passing null configs which would cause JDA to create default configurations. Then the creation of a JDAImpl instance could be as simple as

    java
    AuthorizationConfig conf = new AuthorizationConfig(AccountType.BOT, BOT_TOKEN);
    JDA basicInstance = new JDAImpl(conf, null, null, null);
    
    评论

报告相同问题?