This commit is contained in:
AB
2021-01-05 05:01:34 +03:00
parent d14aa3beb4
commit ed32bd9195
3 changed files with 1135 additions and 10 deletions

1135
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -549,7 +549,7 @@ impl Execute for Omedeto {
#[async_trait]
impl Execute for Code {
async fn run(&self, api: &Api, message: &Message) -> Result<(), Error> {
async fn exec(&self, api: &Api, message: &Message) -> Result<(), Error> {
let lang = "Rust";
let theme = "Dracula";
let code = &self.data;
@ -562,7 +562,11 @@ impl Execute for Code {
Ok(())
}
async fn run_mystem(
async fn exec_with_result(&self, api: &Api, message: &Message) -> Result<String, Error> {
unimplemented!()
}
async fn exec_mystem(
&self,
api: &Api,
message: &Message,

View File

@ -64,7 +64,7 @@ pub async fn handler(
Code {
data: s.to_string(),
}
.run(&api, &message)
.exec(&api, &message)
.await?
}
"/top" => {