Skip to content

Commit b379465

Browse files
committed
Update docs for the event handler setters
1 parent 32600a0 commit b379465

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/gateway/client/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,26 +231,25 @@ impl ClientBuilder {
231231
self.intents
232232
}
233233

234-
/// Adds an event handler with multiple methods for each possible event.
234+
/// Sets the event handler where all received gateway events will be dispatched.
235235
pub fn event_handler(mut self, event_handler: Arc<dyn EventHandler>) -> Self {
236236
self.event_handler = Some(event_handler);
237237
self
238238
}
239239

240-
/// Gets the added event handlers. See [`Self::event_handler`] for more info.
240+
/// Gets the added event handler. See [`Self::event_handler`] for more info.
241241
#[must_use]
242242
pub fn get_event_handler(&self) -> Option<Arc<dyn EventHandler>> {
243243
self.event_handler.clone()
244244
}
245245

246-
/// Adds an event handler with a single method where all received gateway events will be
247-
/// dispatched.
246+
/// Sets the raw event handler where all received gateway events will be dispatched.
248247
pub fn raw_event_handler(mut self, raw_event_handler: Arc<dyn RawEventHandler>) -> Self {
249248
self.raw_event_handler = Some(raw_event_handler);
250249
self
251250
}
252251

253-
/// Gets the added raw event handlers. See [`Self::raw_event_handler`] for more info.
252+
/// Gets the added raw event handler. See [`Self::raw_event_handler`] for more info.
254253
#[must_use]
255254
pub fn get_raw_event_handler(&self) -> Option<Arc<dyn RawEventHandler>> {
256255
self.raw_event_handler.clone()

0 commit comments

Comments
 (0)