gtkcord3 icon indicating copy to clipboard operation
gtkcord3 copied to clipboard

Custom Base URL for litecord support

Open Titaniumtown opened this issue 5 years ago • 6 comments

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?

Titaniumtown avatar Aug 25 '20 23:08 Titaniumtown

You could use compile-time options for this:

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

diamondburned avatar Aug 26 '20 15:08 diamondburned

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

diamondburned avatar Aug 26 '20 15:08 diamondburned

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 avatar Aug 26 '20 15:08 Titaniumtown

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

Titaniumtown avatar Aug 26 '20 15:08 Titaniumtown

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.

diamondburned avatar Aug 26 '20 15:08 diamondburned

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.

Titaniumtown avatar Aug 26 '20 15:08 Titaniumtown