diff options
| author | Zeyla Hellyer <[email protected]> | 2018-01-10 11:28:44 -0800 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2018-01-10 11:29:18 -0800 |
| commit | 524b8f8ab5153e20ad86be2df7fba6bbed159b7c (patch) | |
| tree | 84fd2aa501cf154f4c54d221a2ea7f9fee9e8ec8 /src/framework | |
| parent | Add missing `correct roles`-checks in help-commands (#249) (diff) | |
| download | serenity-524b8f8ab5153e20ad86be2df7fba6bbed159b7c.tar.xz serenity-524b8f8ab5153e20ad86be2df7fba6bbed159b7c.zip | |
Remove `is_bot` boolean from framework
The framework no longer needs the `is_bot` boolean state, since serenity
now only supports bot users.
Diffstat (limited to 'src/framework')
| -rw-r--r-- | src/framework/mod.rs | 10 | ||||
| -rw-r--r-- | src/framework/standard/mod.rs | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/framework/mod.rs b/src/framework/mod.rs index 9f72dc6..47141c1 100644 --- a/src/framework/mod.rs +++ b/src/framework/mod.rs @@ -73,7 +73,7 @@ pub trait Framework { #[doc(hidden)] #[cfg(feature = "standard_framework")] - fn update_current_user(&mut self, UserId, bool) {} + fn update_current_user(&mut self, UserId) {} } impl<F: Framework + ?Sized> Framework for Box<F> { @@ -82,8 +82,8 @@ impl<F: Framework + ?Sized> Framework for Box<F> { } #[cfg(feature = "standard_framework")] - fn update_current_user(&mut self, id: UserId, is_bot: bool) { - (**self).update_current_user(id, is_bot); + fn update_current_user(&mut self, id: UserId) { + (**self).update_current_user(id); } } @@ -93,8 +93,8 @@ impl<'a, F: Framework + ?Sized> Framework for &'a mut F { } #[cfg(feature = "standard_framework")] - fn update_current_user(&mut self, id: UserId, is_bot: bool) { - (**self).update_current_user(id, is_bot); + fn update_current_user(&mut self, id: UserId) { + (**self).update_current_user(id); } } diff --git a/src/framework/standard/mod.rs b/src/framework/standard/mod.rs index 904ce97..4e43cf8 100644 --- a/src/framework/standard/mod.rs +++ b/src/framework/standard/mod.rs @@ -222,7 +222,7 @@ pub struct StandardFramework { /// ../client/event_handler/trait.EventHandler.html#method.on_message /// [`Event::MessageCreate`]: ../model/event/enum.Event.html#variant.MessageCreate pub initialized: bool, - user_info: (u64, bool), + user_id: u64, } impl StandardFramework { @@ -1050,8 +1050,8 @@ impl Framework for StandardFramework { } } - fn update_current_user(&mut self, user_id: UserId, is_bot: bool) { - self.user_info = (user_id.0, is_bot); + fn update_current_user(&mut self, user_id: UserId) { + self.user_id = user_id.0; } } |