forked from sorceress/rustcord
				
			Compare commits
	
		
			No commits in common. "patch/use-once-cell" and "master" have entirely different histories.
		
	
	
		
			patch/use-
			...
			master
		
	
		|  | @ -1,7 +1,5 @@ | |||
| # This file is automatically @generated by Cargo. | ||||
| # It is not intended for manual editing. | ||||
| version = 3 | ||||
| 
 | ||||
| [[package]] | ||||
| name = "adler32" | ||||
| version = "1.0.4" | ||||
|  | @ -873,9 +871,9 @@ dependencies = [ | |||
| 
 | ||||
| [[package]] | ||||
| name = "once_cell" | ||||
| version = "1.8.0" | ||||
| version = "1.4.1" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" | ||||
| checksum = "260e51e7efe62b592207e9e13a68e43692a7a279171d6ba57abd208bf23645ad" | ||||
| 
 | ||||
| [[package]] | ||||
| name = "opaque-debug" | ||||
|  | @ -1276,7 +1274,7 @@ version = "2.0.0" | |||
| dependencies = [ | ||||
|  "brainfrick", | ||||
|  "colored", | ||||
|  "once_cell", | ||||
|  "lazy_static 1.4.0", | ||||
|  "owoify", | ||||
|  "percent-encoding 2.1.0", | ||||
|  "rand 0.8.4", | ||||
|  |  | |||
|  | @ -13,11 +13,11 @@ toml = "0.5.8" | |||
| sys-info = "0.9.0" | ||||
| urbandict = "0.2.0" | ||||
| owoify = "0.1.5" | ||||
| lazy_static = "1.4.0" | ||||
| colored = "2.0.0" | ||||
| brainfrick = "1.1.2" | ||||
| percent-encoding = "2.1.0" | ||||
| regex = "1.5.4" | ||||
| once_cell = "1.8.0" | ||||
| 
 | ||||
| [patch.crates-io] | ||||
| openssl = { git = "https://github.com/ishitatsuyuki/rust-openssl", branch = "0.9.x" } | ||||
|  | @ -33,4 +33,4 @@ features = ["blocking", "json"] | |||
| 
 | ||||
| [dependencies.tokio] | ||||
| version = "1.7.1" | ||||
| features = ["macros", "rt-multi-thread"] | ||||
| features = ["macros", "rt-multi-thread"] | ||||
							
								
								
									
										17
									
								
								src/main.rs
								
								
								
								
							
							
						
						
									
										17
									
								
								src/main.rs
								
								
								
								
							|  | @ -1,8 +1,10 @@ | |||
| #![allow(clippy::unreadable_literal)] | ||||
| #![allow(clippy::cmp_owned)] | ||||
| 
 | ||||
| #[macro_use] | ||||
| extern crate lazy_static; | ||||
| 
 | ||||
| use colored::*; | ||||
| use once_cell::sync::Lazy; | ||||
| use rand::Rng; | ||||
| use serenity::{ | ||||
|     async_trait, | ||||
|  | @ -123,15 +125,18 @@ async fn after(ctx: &Context, msg: &Message, command_name: &str, command_result: | |||
| )] | ||||
| struct General; | ||||
| 
 | ||||
| static OWNERS: Lazy<Vec<serenity::model::id::UserId>> = | ||||
|     Lazy::new(|| vec![UserId(254310746450690048), UserId(687740609703706630)]); | ||||
| lazy_static! { | ||||
|     static ref OWNERS: std::vec::Vec<serenity::model::id::UserId> = | ||||
|         /*         Agatha's Id                  Julia's Id        */ | ||||
|         vec![UserId(254310746450690048), UserId(687740609703706630)]; | ||||
| } | ||||
| 
 | ||||
| #[tokio::main] | ||||
| async fn main() { | ||||
|     let framework = StandardFramework::new() | ||||
|         .configure(|c| { | ||||
|             c.with_whitespace(true) | ||||
|                 .owners(OWNERS.iter().cloned().collect()) | ||||
|                 .owners(OWNERS.clone().into_iter().collect()) | ||||
|                 .prefixes(vec!["owo!", "OwO!", "aga"]) | ||||
|                 .no_dm_prefix(true) | ||||
|                 .case_insensitivity(true) | ||||
|  | @ -168,7 +173,7 @@ async fn main() { | |||
| async fn owner_check( | ||||
|     _: &Context, msg: &Message, _: &mut Args, _: &CommandOptions, | ||||
| ) -> Result<(), Reason> { | ||||
|     if OWNERS.contains(&msg.author.id) { | ||||
|     if OWNERS.clone().contains(&msg.author.id) { | ||||
|         Ok(()) | ||||
|     } else { | ||||
|         Err(Reason::Unknown) | ||||
|  | @ -480,7 +485,7 @@ async fn info(ctx: &Context, message: &Message, args: Args) -> CommandResult { | |||
| 
 | ||||
|     let num = ctx.cache.guilds().await.len(); | ||||
|     // get developer's username
 | ||||
|     let aganame = OWNERS[0].to_user(ctx.http.clone()).await?.tag(); | ||||
|     let aganame = OWNERS.clone()[0].to_user(ctx.http.clone()).await?.tag(); | ||||
|     let _ = message.channel_id.send_message(&ctx.http, |m| m | ||||
| 		.embed(|e| e | ||||
| 			.title("Discordinator9000's info:") | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue