Link all top-level commands with macro recording/replaying logic
This commit is contained in:
		
							
								
								
									
										10
									
								
								src/utils.rs
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								src/utils.rs
									
									
									
									
									
								
							@@ -9,7 +9,7 @@ use poise::{
 | 
			
		||||
 | 
			
		||||
use crate::{
 | 
			
		||||
    consts::{CNC_GUILD, SUBSCRIPTION_ROLES},
 | 
			
		||||
    ApplicationContext, Context,
 | 
			
		||||
    ApplicationContext, Context, Error,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
pub async fn check_subscription(cache_http: impl CacheHttp, user_id: impl Into<UserId>) -> bool {
 | 
			
		||||
@@ -65,11 +65,17 @@ pub fn footer(ctx: Context<'_>) -> CreateEmbedFooter {
 | 
			
		||||
    ))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pub trait Recordable {
 | 
			
		||||
    async fn run(self, ctx: Context<'_>) -> Result<(), Error>;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pub use recordable_derive::Recordable;
 | 
			
		||||
 | 
			
		||||
pub trait Extract {
 | 
			
		||||
    fn extract(ctx: ApplicationContext) -> Self;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pub use extract_macro::Extract;
 | 
			
		||||
pub use extract_derive::Extract;
 | 
			
		||||
 | 
			
		||||
macro_rules! extract_arg {
 | 
			
		||||
    ($ctx:ident, $name:ident, String) => {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user