Skip to main content
4 events
when toggle format what by license comment
Jun 25, 2020 at 15:38 comment added Hans-Martin Mosner Regarding the first comment, yes, using the internal ID would be simplest. The name then is only a kind of comment. Regarding the second comment, that's what I meant with "handle", I did not check how Discord calls it. Storing as separate fields is perhaps the easiest approach, then your ID field is fixed and only the name field can ever be changed.
Jun 25, 2020 at 15:06 comment added SneakyShrike Another thing I have to ask, is that when you say 'handle' do you mean the unique number and non unqiue name merged together to create the overall ID for the user? Also you said I could store the number and the name as a single string or store them seperatly, would there be any advantages / disadvantages to either approach? Sorry for all the questions but i'm fairly new to programming. And I appreciate your first answer.
Jun 25, 2020 at 15:01 comment added SneakyShrike I think you're quite right in saying I should forget about how Discord do it. As for my own approach, would the hidden id you mentioned be the numeric part that should be unique, and the name part the one that can be the same? That's how the Stack Exchanges seems to work. I even tested it and changed my username to 'test'. I looked up users called test and there were loads, each had their own unique 6 digit number in the user profiles urls along with their identical names of 'test'. That approach seems a lot more simple and reasonable.
Jun 25, 2020 at 5:12 history answered Hans-Martin Mosner CC BY-SA 4.0