(script: &Script, suffix: &str)
| 197 | } |
| 198 | |
| 199 | fn script_url(script: &Script, suffix: &str) -> Url { |
| 200 | if let Some(plugin_id) = &script.plugin_id { |
| 201 | return Url::parse(&format!( |
| 202 | "file:///plugins/{}/{}.{suffix}", |
| 203 | plugin_id, script.name |
| 204 | )) |
| 205 | .unwrap(); |
| 206 | } |
| 207 | |
| 208 | Url::parse(&format!("file:///guild_scripts/{}.{suffix}", script.name)).unwrap() |
| 209 | } |
| 210 | |
| 211 | pub struct BlCoreOptions { |
| 212 | cloned_load_states: Rc<RefCell<ScriptsStateStore>>, |