How do I ban someone who has already left the server (/ban with an ID)?
A troublemaker leaves the server before you had time to react? /ban accepts an account ID instead of a member, and bans even if they are no longer there.
Get the ID
- Turn on developer mode in Discord User Settings › Advanced › Developer Mode.
- Right-click their name or photo, in an old message
- Click “Copy User ID”
Ban with the ID
- Type
/ban - Leave
utilisateurempty and paste the ID inid - Add a
raisonthen confirm
Possible error messages
| Message | Cause |
|---|---|
| Specify a user or an ID | You filled in neither utilisateur nor id. |
| Invalid ID (17 to 20 digits) | The ID was copied wrongly (letters, spaces, too short). |
| This user is already banned | Nothing to do, they already are. |
| You can’t moderate yourself | It is your own ID. |
| Unable to moderate this user | They are still on the server and their role is above or equal to the bot’s. See troubleshooting. |
If you fill in both
The member mention takes priority over the ID.
Still stuck?
Contact support with the title of this article, the step where you are stuck and what you see on screen.
Contact support More articles: ModerationLast checked: 13 November 2026.