removed framework impl

This commit is contained in:
jellywx 2021-11-02 20:19:29 +00:00
parent f1bfc11160
commit a21f518b21
4 changed files with 18 additions and 36 deletions

25
Cargo.lock generated
View File

@ -174,16 +174,6 @@ dependencies = [
"serde", "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]] [[package]]
name = "core-foundation" name = "core-foundation"
version = "0.9.2" version = "0.9.2"
@ -1460,7 +1450,6 @@ dependencies = [
"bitflags", "bitflags",
"bytes", "bytes",
"chrono", "chrono",
"command_attr",
"dashmap", "dashmap",
"flate2", "flate2",
"futures", "futures",
@ -1471,12 +1460,10 @@ dependencies = [
"reqwest", "reqwest",
"serde", "serde",
"serde_json", "serde_json",
"static_assertions",
"tokio", "tokio",
"tracing", "tracing",
"typemap_rev", "typemap_rev",
"url", "url",
"uwl",
] ]
[[package]] [[package]]
@ -1658,12 +1645,6 @@ dependencies = [
"tokio-rustls", "tokio-rustls",
] ]
[[package]]
name = "static_assertions"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]] [[package]]
name = "stringprep" name = "stringprep"
version = "0.1.2" version = "0.1.2"
@ -2002,12 +1983,6 @@ dependencies = [
"getrandom 0.2.3", "getrandom 0.2.3",
] ]
[[package]]
name = "uwl"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4bf03e0ca70d626ecc4ba6b0763b934b6f2976e8c744088bb3c1d646fbb1ad0"
[[package]] [[package]]
name = "vcpkg" name = "vcpkg"
version = "0.2.15" version = "0.2.15"

View File

@ -22,9 +22,25 @@ serde_repr = "0.1"
rmp-serde = "0.15" rmp-serde = "0.15"
rand = "0.7" rand = "0.7"
levenshtein = "1.0" 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"]} sqlx = { version = "0.5", features = ["runtime-tokio-rustls", "macros", "mysql", "bigdecimal", "chrono"]}
base64 = "0.13.0" base64 = "0.13.0"
[dependencies.regex_command_attr] [dependencies.regex_command_attr]
path = "command_attributes" 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"
]

View File

@ -9,16 +9,13 @@ use std::{
use log::info; use log::info;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use serenity::{ use serenity::{
async_trait,
builder::{CreateApplicationCommands, CreateComponents, CreateEmbed}, builder::{CreateApplicationCommands, CreateComponents, CreateEmbed},
cache::Cache, cache::Cache,
client::Context, client::Context,
framework::Framework,
futures::prelude::future::BoxFuture, futures::prelude::future::BoxFuture,
http::Http, http::Http,
model::{ model::{
channel::Message, guild::Guild,
guild::{Guild, Member},
id::{ChannelId, GuildId, RoleId, UserId}, id::{ChannelId, GuildId, RoleId, UserId},
interactions::{ interactions::{
application_command::{ application_command::{
@ -689,8 +686,3 @@ impl RegexFramework {
} }
} }
} }
#[async_trait]
impl Framework for RegexFramework {
async fn dispatch(&self, _ctx: Context, _msg: Message) {}
}

View File

@ -244,7 +244,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
}) })
.application_id(application_id.0) .application_id(application_id.0)
.event_handler(Handler) .event_handler(Handler)
.framework_arc(framework_arc.clone())
.await .await
.expect("Error occurred creating client"); .expect("Error occurred creating client");