Skip to content

Github commands package crashes all bot features if github key is not configured #1020

Closed
@ankitsmt211

Description

@ankitsmt211

Describe the bug

Ideally when setting up bot, it should work with copy paste of config.template and bot token only. But atm, without entering githubAPI key, none of the other features work.

The root cause seems to be contructors of both GithubCommand.java and GithubReference.java, both calls two methods updateCache() and acquireRespositories(), but since we havent configured key yet this ends up crashing all other features.

Expected behavior

Other features except /github-search and GithubReference should work without githubAPI key.

To Reproduce

  1. Clone Bot.
  2. Copy config.json.template and create a new file inside application folder named config.json.
  3. Add discord bot token.
  4. When bot is live, use /ping or any other feature.

Additional context

constructor of GithubCommand

image

constructor of GithubReference
image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions