Endpoints
Get bans
async fn advanced_paginate(&self, page: u8, per_page: u8) -> HttpResult<BanList, BanError>
async fn paginate(&self) -> HttpResult<BanList, BanError>
//paginate() is an advanced_paginate() shortcut with default parameters (1, 12)
Report an user
async fn add<S: ToString>(&self,
user_id: u64,
reason: S,
proof: S,
moderator: Option<u64>,
user_name: Option<String>,
user_discriminator: Option<u16>,
appeal_possible: Option<bool>)
-> HttpResult<BanAdditionResponse, BanError>
Check if user is banned
async fn check_ban(&self, user_id: u64) -> Result<BanCheckResponse>
Get information about a ban
async fn ban_info(&self, user_id: u64) -> HttpResult<BanInfoResponse, BanError
Delete a ban
To use this method you must have BAN_MANAGER permission
async fn delete(&self, user_id: u64) -> HttpResult<BanDeletionResponse, BanError>
//or
async fn delete_forcing(&self, user_id: u64) -> HttpResult<BanDeletionResponse, BanError>
//to force the ban deletion
Last updated
Was this helpful?