From a21f518b21849436cc0cf2a43b62e36dd5b4bf1e Mon Sep 17 00:00:00 2001 From: jellywx Date: Tue, 2 Nov 2021 20:19:29 +0000 Subject: [PATCH] removed framework impl --- Cargo.lock | 25 ------------------------- Cargo.toml | 18 +++++++++++++++++- src/framework.rs | 10 +--------- src/main.rs | 1 - 4 files changed, 18 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eb40fb9..78dea7a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -174,16 +174,6 @@ dependencies = [ "serde", ] -[[package]] -name = "command_attr" -version = "0.3.7" -source = "git+https://github.com/serenity-rs/serenity?branch=next#d1f944b0729a83d60925ce49b7d83eeaed83bd73" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "core-foundation" version = "0.9.2" @@ -1460,7 +1450,6 @@ dependencies = [ "bitflags", "bytes", "chrono", - "command_attr", "dashmap", "flate2", "futures", @@ -1471,12 +1460,10 @@ dependencies = [ "reqwest", "serde", "serde_json", - "static_assertions", "tokio", "tracing", "typemap_rev", "url", - "uwl", ] [[package]] @@ -1658,12 +1645,6 @@ dependencies = [ "tokio-rustls", ] -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - [[package]] name = "stringprep" version = "0.1.2" @@ -2002,12 +1983,6 @@ dependencies = [ "getrandom 0.2.3", ] -[[package]] -name = "uwl" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4bf03e0ca70d626ecc4ba6b0763b934b6f2976e8c744088bb3c1d646fbb1ad0" - [[package]] name = "vcpkg" version = "0.2.15" diff --git a/Cargo.toml b/Cargo.toml index f292672..804d720 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,9 +22,25 @@ serde_repr = "0.1" rmp-serde = "0.15" rand = "0.7" levenshtein = "1.0" -serenity = { git = "https://github.com/serenity-rs/serenity", branch = "next", features = ["collector", "unstable_discord_api"] } sqlx = { version = "0.5", features = ["runtime-tokio-rustls", "macros", "mysql", "bigdecimal", "chrono"]} base64 = "0.13.0" [dependencies.regex_command_attr] path = "command_attributes" + +[dependencies.serenity] +git = "https://github.com/serenity-rs/serenity" +branch = "next" +default-features = false +features = [ + "builder", + "client", + "cache", + "gateway", + "http", + "model", + "utils", + "rustls_backend", + "collector", + "unstable_discord_api" +] diff --git a/src/framework.rs b/src/framework.rs index 970105f..f1efc0a 100644 --- a/src/framework.rs +++ b/src/framework.rs @@ -9,16 +9,13 @@ use std::{ use log::info; use serde::{Deserialize, Serialize}; use serenity::{ - async_trait, builder::{CreateApplicationCommands, CreateComponents, CreateEmbed}, cache::Cache, client::Context, - framework::Framework, futures::prelude::future::BoxFuture, http::Http, model::{ - channel::Message, - guild::{Guild, Member}, + guild::Guild, id::{ChannelId, GuildId, RoleId, UserId}, interactions::{ application_command::{ @@ -689,8 +686,3 @@ impl RegexFramework { } } } - -#[async_trait] -impl Framework for RegexFramework { - async fn dispatch(&self, _ctx: Context, _msg: Message) {} -} diff --git a/src/main.rs b/src/main.rs index e4e257e..9ff66d1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -244,7 +244,6 @@ async fn main() -> Result<(), Box> { }) .application_id(application_id.0) .event_handler(Handler) - .framework_arc(framework_arc.clone()) .await .expect("Error occurred creating client");