aboutsummaryrefslogtreecommitdiff
path: root/src/client/context.rs
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-06-13 21:43:03 -0700
committerZeyla Hellyer <[email protected]>2017-06-13 21:43:03 -0700
commit8b504ad7f6e10fecb27583a949262eb61cfd266d (patch)
treeb379f99ea6756603c612cdd3d58f8227bffc94b4 /src/client/context.rs
parentFix CurrentUser::invite_url (diff)
downloadserenity-8b504ad7f6e10fecb27583a949262eb61cfd266d.tar.xz
serenity-8b504ad7f6e10fecb27583a949262eb61cfd266d.zip
Remove Context::{channel_id, queue}
The `channel_id` field on Context is no longer required internally, and is no longer of use to userland as event handlers are given the channel ID in some way where possible. `queue` is a remnant from when the Context was the primary way to interact with the REST API.
Diffstat (limited to 'src/client/context.rs')
-rw-r--r--src/client/context.rs13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/client/context.rs b/src/client/context.rs
index ec072ca..e9b6d13 100644
--- a/src/client/context.rs
+++ b/src/client/context.rs
@@ -29,11 +29,6 @@ use ::http;
/// [`set_game`]: #method.set_game
#[derive(Clone)]
pub struct Context {
- /// The Id of the relevant channel, if there is one. This is present on the
- /// [`on_message`] handler, for example.
- ///
- /// [`on_message`]: struct.Client.html#method.on_message
- pub channel_id: Option<ChannelId>,
/// A clone of [`Client::data`]. Refer to its documentation for more
/// information.
///
@@ -44,8 +39,6 @@ pub struct Context {
/// Note that if you are sharding, in relevant terms, this is the shard
/// which received the event being dispatched.
pub shard: Arc<Mutex<Shard>>,
- /// The queue of messages that are sent after context goes out of scope.
- pub queue: String,
}
impl Context {
@@ -57,14 +50,10 @@ impl Context {
/// Or don't do what I say. I'm just a comment hidden from the generated
/// documentation.
#[doc(hidden)]
- pub fn new(channel_id: Option<ChannelId>,
- shard: Arc<Mutex<Shard>>,
- data: Arc<Mutex<ShareMap>>) -> Context {
+ pub fn new(shard: Arc<Mutex<Shard>>, data: Arc<Mutex<ShareMap>>) -> Context {
Context {
- channel_id: channel_id,
data: data,
shard: shard,
- queue: String::new(),
}
}