aboutsummaryrefslogtreecommitdiff
path: root/src/bot.rs
diff options
context:
space:
mode:
authorNathan Perry <np@nathanperry.dev>2024-08-07 07:39:16 -0400
committerNathan Perry <np@nathanperry.dev>2024-08-07 07:39:16 -0400
commitb58b03c22d637fe8f7200edb6953325bf359544d (patch)
tree606865b7afc4498b02da14895723b2b0ed49760e /src/bot.rs
parent96c197bde0f83d8b99ec66238856c76b41bfd5e1 (diff)
split calc into separate subcrate
Diffstat (limited to 'src/bot.rs')
-rw-r--r--src/bot.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/bot.rs b/src/bot.rs
index 6a2ae72..4942c98 100644
--- a/src/bot.rs
+++ b/src/bot.rs
@@ -57,10 +57,8 @@ use crate::{
err_msg,
util,
util::OAUTH_URL,
- Error,
PoiseContext,
PoiseData,
- Result,
};
pub struct HttpKey;
@@ -151,8 +149,8 @@ lazy_static! {
let restrict_path = CONFIG.restrict.as_ref().unwrap_or(&default_path);
let restrict_ids = File::open(restrict_path)
- .map_err(Error::from)
- .and_then(|f| serde_json::from_reader::<_, Vec<u64>>(f).map_err(Error::from));
+ .map_err(anyhow::Error::from)
+ .and_then(|f| serde_json::from_reader::<_, Vec<u64>>(f).map_err(anyhow::Error::from));
if let Err(ref e) = restrict_ids {
warn!("opening restrict file: {}", e);
@@ -211,7 +209,7 @@ fn on_err(err: FrameworkError<PoiseData, anyhow::Error>) -> BoxFuture<()> {
fn noop<U, E>(
_ctx: PrefixContext<'_, U, E>,
- ) -> BoxFuture<core::result::Result<(), FrameworkError<U, E>>> {
+ ) -> BoxFuture<Result<(), FrameworkError<U, E>>> {
Box::pin(async { Ok(()) })
}
@@ -365,7 +363,7 @@ fn after_handle(ctx: PoiseContext) -> BoxFuture<()> {
})
}
-pub async fn run() -> Result<()> {
+pub async fn run() -> anyhow::Result<()> {
let token = &CONFIG.discord.auth.token;
let sb_config = songbird::Config::default();