R
R
Rikonardo2019-07-30 17:43:16
PHP
Rikonardo, 2019-07-30 17:43:16

How to interpret Discord user flags in PHP?

A Discord user has a "flags" parameter that contains information about all of the user's "icons".
The problem is that this parameter is a single variable of type int , which can contain information about several icons at once.
The documentation describes this rather vaguely.

Screenshot
5d4055fb352e2939554303.png

For example, I have only one "House Balance" icon, but my "flags" parameter value is 256 .
I need to understand how this works so that I can get a list of the user's icons in PHP from the "flags" value.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JhaoDa, 2019-07-30
@REKTOR_RG

Google "%lang% bitwise operators".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question