The 1234 part changes too and if you pay for the premium service, called Discord Nitro, you can set it it to whatever you want instead of a random value.
Its only purpose is to prevent name collisions.
In many fashions, the account is identified by a "snowflake", a 64-bit ID space that every user, every guild/"server", every channel, and every message has.
Its described here and is the only permanent identity on the account, since everything else can be changed. The identity used to @ is transient and can change at any time, but the client, the API, and the myraid of bots written for Discord know the real identity is the snowflake ID.
In many fashions, the account is identified by a "snowflake", a 64-bit ID space that every user, every guild/"server", every channel, and every message has.
Its described here and is the only permanent identity on the account, since everything else can be changed. The identity used to @ is transient and can change at any time, but the client, the API, and the myraid of bots written for Discord know the real identity is the snowflake ID.
https://discord.com/developers/docs/reference#snowflakes
At what point is it no longer an identity and instead a database identifier? That's a good question.