gaato/discord/endpoint_http does not have a README file

InteractionsServer

pub struct InteractionsServer {
// private fields
}

A native HTTP server dispatching Discord interactions through an App.

InteractionsServer::addr

fn InteractionsServer::addr(self : InteractionsServer) -> String

Return the actual listening address, including an OS-assigned port.

InteractionsServer::close

fn InteractionsServer::close(self : InteractionsServer) -> Unit

Stop accepting requests and cancel active connection handlers.

serve_interactions

async fn[X] serve_interactions(group :
TaskGroup
[X], app :
App
, addr~ : String, public_key~ : String, client? :
Client
, token? : String, application_id? :
Id
[
ApplicationMarker
], sync? : Bool, path? : String, deadline_ms? : Int) -> InteractionsServer

Start a native Discord HTTP-interactions server in group.

Use port zero in addr to let the OS choose a free port, then read the resolved address from InteractionsServer::addr.

Source Files