Android
How to copy IDs on Discord for Android.

Developer Mode

Before you can copy an ID, you must turn on Developer Mode in your Discord settings.
First, tap the three horizontal lines in the top left corner of the screen. If the three horizontal lines are in the top right corner of the screen, move on to the next step.
Next, tap on your profile picture to open your Discord settings.
Then navigate to the Behavior tab and turn on the switch next to Developer Mode.

Copying an ID

Item
Method
Message
Long press the message and select Copy ID from the menu.
Channel
Long press the channel in the channel list and select Copy ID from the menu.
Category
Long press the category and select Copy ID from the menu.
Server
Tap the three vertical dots next to the server name and select Copy ID from the menu.
User
Tap the user's profile picture and select Copy ID from the menu.
Role
Tap the profile picture of a user who has the role and tap the role name.