Moved some more files into separate folders
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
use serde_json::Value;
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
use crate::{db::terminal_args::Args, games::wwrps::RPSGame, lang::Lang};
|
||||
|
||||
|
||||
pub struct Data {
|
||||
pub owners: Vec<u64>,
|
||||
pub ball_prompts: [Vec<String>; 2],
|
||||
pub rps_game: Mutex<RPSGame>,
|
||||
pub reddit_data: Mutex<Option<Value>>,
|
||||
pub discord_data: Mutex<Option<Value>>,
|
||||
pub cfg: Mutex<Option<toml::Value>>,
|
||||
pub bk_mods: Vec<u64>,
|
||||
pub args: Args,
|
||||
pub lang_name: Mutex<String>,
|
||||
pub lang: Mutex<Lang>
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
use clap::Parser;
|
||||
use serde::Serialize;
|
||||
|
||||
|
||||
#[derive(Parser, Serialize, Clone)]
|
||||
pub struct Args {
|
||||
#[arg(short = 'p', long, default_value = "2920", help = "Sets the port number, e.g 2200.")]
|
||||
pub port: u16,
|
||||
|
||||
#[arg(long, help = "Runs only the Python part of the program.")]
|
||||
pub py: bool,
|
||||
|
||||
#[arg(long, help = "Runs only the Rust part of the program.")]
|
||||
pub rs: bool,
|
||||
|
||||
#[arg(short = 'd', long, help = "Enables dev mode. Dev mode shows more debug info and turns off certain security measures.")]
|
||||
pub dev: bool,
|
||||
|
||||
#[arg(short = 'w', long, help = "Wipes all data before running the program.")]
|
||||
pub wipe: bool,
|
||||
|
||||
#[arg(short = 't', long, help = "Makes the program use the ASSISTANT_TOKEN_TEST env var instead of ASSISTANT_TOKEN. This env var should hold the token of a non-production bot.")]
|
||||
pub test: bool,
|
||||
|
||||
#[arg(long, help = "Adds annoying prints when the websockets send a ping. Why though?")]
|
||||
pub ping: bool,
|
||||
|
||||
#[arg(long, help = "Makes the program not use the schedule system.")]
|
||||
pub nosched: bool
|
||||
}
|
||||
Reference in New Issue
Block a user