Piecewise

Build chat bots with blocks

ban user (user) from server (guild) with reason (reason)

In Discord → Moderation

Jump to block

Ban a user from a server.

Requires the following blocks to be present in the project: discord login

Parameters

Parameter name Parameter type Required? Description
user user The user to ban.
guild guild The server to ban the user from.
reason String The reason for the ban. Viewable in audit logs.

Output

void - This is a statement with no outputs