fixed an issue with utc time. removed intents
This commit is contained in:
		@@ -235,13 +235,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
 | 
				
			|||||||
    let framework_arc = Arc::new(framework);
 | 
					    let framework_arc = Arc::new(framework);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    let mut client = Client::builder(&token)
 | 
					    let mut client = Client::builder(&token)
 | 
				
			||||||
        .intents(if dm_enabled {
 | 
					        .intents(GatewayIntents::GUILDS)
 | 
				
			||||||
            GatewayIntents::GUILD_MESSAGES
 | 
					 | 
				
			||||||
                | GatewayIntents::GUILDS
 | 
					 | 
				
			||||||
                | GatewayIntents::DIRECT_MESSAGES
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
            GatewayIntents::GUILD_MESSAGES | GatewayIntents::GUILDS
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
        .application_id(application_id.0)
 | 
					        .application_id(application_id.0)
 | 
				
			||||||
        .event_handler(Handler)
 | 
					        .event_handler(Handler)
 | 
				
			||||||
        .await
 | 
					        .await
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -76,7 +76,7 @@ impl ReminderBuilder {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        match queried_time.utc_time {
 | 
					        match queried_time.utc_time {
 | 
				
			||||||
            Some(utc_time) => {
 | 
					            Some(utc_time) => {
 | 
				
			||||||
                if utc_time < (Utc::now() + Duration::seconds(60)).naive_local() {
 | 
					                if utc_time < (Utc::now() - Duration::seconds(60)).naive_local() {
 | 
				
			||||||
                    Err(ReminderError::PastTime)
 | 
					                    Err(ReminderError::PastTime)
 | 
				
			||||||
                } else {
 | 
					                } else {
 | 
				
			||||||
                    sqlx::query!(
 | 
					                    sqlx::query!(
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user