aboutsummaryrefslogtreecommitdiff
path: root/src/bot.rs
diff options
context:
space:
mode:
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();