gord-project / gord

The Discord terminal client you never knew you wanted.
https://yellowsink.vercel.app/project/gord
BSD 3-Clause "New" or "Revised" License
65 stars 6 forks source link

Change API Endpoint #20

Open mugman174 opened 3 years ago

mugman174 commented 3 years ago

What do you want

I want to change the API endpoint for Gord's requests. Normally, Gord accesses discord's api at discord.com/api, but I want to be able to change that for use with Fosscord.

Why

It will allow compatibility with projects like litecord (not lightcord) and Fosscord.

Implementation hints

config file entry maybe

Bios-Marcel commented 3 years ago

FYI this is already possible @cainy-a https://pkg.go.dev/github.com/cainy-a/discordgo#SetEndpoints

Just needs a config entry or CLI parameter

yellowsink commented 3 years ago

Oh ok awesome!

Bios-Marcel commented 3 years ago

Might want to make this a per session thing though, as accounts may want to connect to different backends or you may even support multiple parallel sessions that use the same interface. Taking #18 and this issue at the same time into account.

Right now this is package wide, so all session instances would use the same endpoints. Would require some changes throughout discordgo though. Probably can cover most of it with a simple regex though.

yellowsink commented 3 years ago

that seems sensible yes

yellowsink commented 3 years ago

ig thats just an extra thing to store with the accounts array

mugman174 commented 3 years ago

Thx

yellowsink commented 3 years ago

Why'd you close this? It hasn't been implemented...

mugman174 commented 3 years ago

Why'd you close this? It hasn't been implemented...

Idk I’m on my phone rn so probably misclicked

yellowsink commented 3 years ago

ok

yellowsink commented 3 years ago

i guess close with comment and comment are fairly close together on small screens