diamondburned / gtkcord3

A Gtk3 Discord client in Golang
GNU General Public License v3.0
628 stars 28 forks source link

Custom Base URL for litecord support #93

Open Titaniumtown opened 4 years ago

Titaniumtown commented 4 years ago

Could you add an option to overwrite the Base URL for discord requests so custom backends like litecord (https://gitlab.com/litecord/litecord) could be used?

diamondburned commented 4 years ago

You could use compile-time options for this:

go build -ldflags="-X 'github.com/diamondburned/arikawa/api.BaseEndpoint=https://discord.com'"

diamondburned commented 4 years ago

Documentation: https://godoc.org/github.com/diamondburned/arikawa/api#pkg-variables

Titaniumtown commented 4 years ago

Could this just simply be added as a config option of sorts? I compile gtkcord via the aur, so I would have to edit the PKGBUILD just to try out litecord.

Titaniumtown commented 4 years ago

You could use compile-time options for this:

go build -ldflags="-X 'github.com/diamondburned/arikawa/api.BaseEndpoint=https://discord.com'"

I did that and got the error:

gtkcord/components/popup/stateful.go:10:2: module github.com/diamondburned/ningen@latest found (v0.1.0), but does not contain package github.com/diamondburned/ningen/handlerrepo
diamondburned commented 4 years ago

Another one of the (maybe closed) issue here is related to that issue. It has to do with the fact that this project isn't maintained by me anymore.

Which leads us to the answer of your question. You'll have to PR or hope for one for the option to be added. The PR will have to be onto Arikawa's upstream as well.

Titaniumtown commented 4 years ago

I don't know any go, nor do I have the time to learn atm (school :roll_eyes:). So I guess I'll have to leave this one up to someone who has the experience and know-how to do it.