Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get User Language #535

Closed
andrei1058 opened this issue Feb 27, 2018 · 11 comments
Closed

Get User Language #535

andrei1058 opened this issue Feb 27, 2018 · 11 comments
Assignees

Comments

@andrei1058
Copy link

Hi!
It would be nice to know the user's language so we can provide content in user's language.
Thanks.

@msciotti
Copy link
Contributor

I will let @night or @jhgg weigh in on the feasibility of this. Thank you for the request!

@jhgg
Copy link
Contributor

jhgg commented Mar 2, 2018

It is feasible. Not sure if we should expose another scope for this, or just have it be in the regular user scope.

@andrei1058
Copy link
Author

any update?

@macdja38
Copy link
Contributor

It would be nice to have available without an oauth scope so it could be used to serve commands in a users language and localize formats.

@tech6hutch
Copy link

That would be convenient, but what if a user doesn't want a bot to know what language they use? Correct me if I'm wrong, but no user settings are currently exposed to bots.

@Still34
Copy link

Still34 commented Apr 16, 2018

Surely the value could be null'd or default to en-US?

@shikhir-arora
Copy link
Contributor

Having it as part of the user scope seems to make the most sense, and as @tech6hutch mentioned - I don't think having it exposed without a scope is a great idea. It's not the most private information by any means, but it could cause users to be confused if the application/bot knows their language setting if they aren't familiar.

Keeping it as a scope means the user would allow access explicitly vs. implicitly which should really be the case for any scope, even something simple like language.

@nullpixel
Copy link

I personally like the idea of letting bots have it without a scope for localisation purposes. Perhaps allow an opt-out rather than making it opt-in, since most users won't care.

@msciotti msciotti self-assigned this May 22, 2018
@msciotti
Copy link
Contributor

msciotti commented May 29, 2018

This was completed over the weekend, and should be deployed within the next couple days. I will update documentation accordingly and will close this issue when it's deployed.

EDIT: This is deployed!

image

@Zubastic
Copy link

Zubastic commented Jun 4, 2020

@msciotti it OK, that now for users locale returning null?

@Zeph108-dev
Copy link

Zeph108-dev commented Sep 11, 2022

you can use interaction.locale if you use slash commands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants