diff options
| author | acdenisSK <[email protected]> | 2017-11-21 16:07:53 +0100 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-11-21 16:07:53 +0100 |
| commit | f61816ca141add5024e36e073764b7c824872ca4 (patch) | |
| tree | 357317f5574698bb67c8a73f633443a50ed20d14 /src/framework/standard/command.rs | |
| parent | Remove client close handle (diff) | |
| download | serenity-f61816ca141add5024e36e073764b7c824872ca4.tar.xz serenity-f61816ca141add5024e36e073764b7c824872ca4.zip | |
Add a way to execute code when a command is registered
Diffstat (limited to 'src/framework/standard/command.rs')
| -rw-r--r-- | src/framework/standard/command.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/framework/standard/command.rs b/src/framework/standard/command.rs index 5633fd6..4ace064 100644 --- a/src/framework/standard/command.rs +++ b/src/framework/standard/command.rs @@ -128,6 +128,9 @@ pub trait Command: Send + Sync + 'static { fn options(&self) -> Arc<CommandOptions> { Arc::clone(&DEFAULT_OPTIONS) } + + /// Called when the command gets registered. + fn init(&self) {} } impl Command for Arc<Command> { |