|
|
@@ -0,0 +1,188 @@ |
|
|
|
use crate::discord::{Interaction, InteractionResponse, InteractionApplicationCommandCallbackData, Embed, EmbedFooter, EmbedAuthor, EmbedField}; |
|
|
|
|
|
|
|
pub fn cardlife(interaction: &Interaction) -> InteractionResponse { |
|
|
|
let cmd = interaction.cmd().unwrap(); |
|
|
|
// build embed |
|
|
|
let embed = Embed { |
|
|
|
title: Some("CLre and CLIPA".to_string()), |
|
|
|
type_: None, |
|
|
|
description: Some( |
|
|
|
"Cardlife is no longer received updates, not even bugfixes. \ |
|
|
|
To fix that, NGnius started the CLre mod to apply bugfixes to Cardlife. \ |
|
|
|
With help from Zhang and other community members, CLre now fixes most critical bugs. |
|
|
|
|
|
|
|
CLre is a code mod that requires CLIPA to work. \ |
|
|
|
CLIPA patches Cardlife so that it will load CLre and other compatible mods. \ |
|
|
|
To install CLIPA, download the [latest release](https://git.exmods.org/NGnius/CLIPA/releases), \ |
|
|
|
then follow [steps 2 through 4](https://git.exmods.org/NGnius/CLIPA#user-content-how-to-install) \ |
|
|
|
or join the official Cardlife server for more in-depth instructions. \ |
|
|
|
Once CLIPA is installed, \ |
|
|
|
download the latest version of [CLre](https://git.exmods.org/NGnius/CLre/releases) and place it in the Plugins folder in your Cardlife install folder." |
|
|
|
.to_string()), |
|
|
|
url: None, |
|
|
|
timestamp: None, |
|
|
|
color: Some(0x00C800), // Colour::from_rgb(0, 200, 0) |
|
|
|
footer: Some(EmbedFooter { |
|
|
|
text: "NGnius".to_string(), |
|
|
|
icon_url: Some("https://git.exmods.org/user/avatar/NGnius/-1".to_string()), |
|
|
|
proxy_icon_url: None, |
|
|
|
}), |
|
|
|
image: None, |
|
|
|
thumbnail: None, |
|
|
|
video: None, |
|
|
|
provider: None, |
|
|
|
author: Some(EmbedAuthor { |
|
|
|
name: Some("Cardlife Modding Overview".to_string()), |
|
|
|
url: Some("https://exmods.org/".to_string()), |
|
|
|
icon_url: None, |
|
|
|
proxy_icon_url: None |
|
|
|
}), |
|
|
|
fields: Some(vec![ |
|
|
|
EmbedField { |
|
|
|
name: "CLre".to_string(), |
|
|
|
value: "[view releases](https://git.exmods.org/NGnius/CLre/releases)".to_string(), |
|
|
|
inline: Some(true), |
|
|
|
}, |
|
|
|
EmbedField { |
|
|
|
name: "CLIPA".to_string(), |
|
|
|
value: "[view releases](https://git.exmods.org/NGnius/CLIPA/releases)".to_string(), |
|
|
|
inline: Some(true), |
|
|
|
} |
|
|
|
]) |
|
|
|
}; |
|
|
|
InteractionResponse::ChannelMessageWithSource { |
|
|
|
data: Some(InteractionApplicationCommandCallbackData { |
|
|
|
tts: false, |
|
|
|
content: "".to_string(), |
|
|
|
allowed_mentions: None, |
|
|
|
embeds: Some(vec![embed]), |
|
|
|
flags: flag_by_user(&cmd.member.user.unwrap().id), |
|
|
|
}), |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
pub fn robocraft(interaction: &Interaction) -> InteractionResponse { |
|
|
|
let cmd = interaction.cmd().unwrap(); |
|
|
|
// build embed |
|
|
|
let embed = Embed { |
|
|
|
title: Some("RC2 and RCIPA".to_string()), |
|
|
|
type_: None, |
|
|
|
description: Some( |
|
|
|
"Robocraft modding work is still WIP, but the RC2 mod adds some much-requested features to RC. \ |
|
|
|
You must install RCIPA first to load mods such as RC2, but it's definitely worth it! \ |
|
|
|
RCIPA also uses some quantum computing to circumvent EAC since that prevents modifications to Robocraft. |
|
|
|
|
|
|
|
RC2 adds rotating platforms and crossplay with Robocraft Infinity (the Xbox version). \ |
|
|
|
The 100 garage bay limit is also removed. \ |
|
|
|
Think Procelio meets the RC15 project, but without the uncertainty, monetization, and (potential) legal problems." |
|
|
|
.to_string()), |
|
|
|
url: None, |
|
|
|
timestamp: None, |
|
|
|
color: Some(0x00C800), // Colour::from_rgb(0, 200, 0) |
|
|
|
footer: Some(EmbedFooter { |
|
|
|
text: cmd.member.nick.unwrap_or(cmd.member.user.unwrap().username), |
|
|
|
icon_url: Some("https://git.exmods.org/img/favicon.png".to_string()), |
|
|
|
proxy_icon_url: None, |
|
|
|
}), |
|
|
|
image: None, |
|
|
|
thumbnail: None, |
|
|
|
video: None, |
|
|
|
provider: None, |
|
|
|
author: Some(EmbedAuthor { |
|
|
|
name: Some("Robocraft Modding Overview".to_string()), |
|
|
|
url: Some("http://zettagram.com/".to_string()), |
|
|
|
icon_url: None, |
|
|
|
proxy_icon_url: None |
|
|
|
}), |
|
|
|
fields: Some(vec![ |
|
|
|
EmbedField { |
|
|
|
name: "libfj".to_string(), |
|
|
|
value: "[more info](https://github.com/NGnius/libfj)".to_string(), |
|
|
|
inline: Some(true), |
|
|
|
} |
|
|
|
]) |
|
|
|
}; |
|
|
|
InteractionResponse::ChannelMessageWithSource { |
|
|
|
data: Some(InteractionApplicationCommandCallbackData { |
|
|
|
tts: false, |
|
|
|
content: "".to_string(), |
|
|
|
allowed_mentions: None, |
|
|
|
embeds: Some(vec![embed]), |
|
|
|
flags: Some(64), |
|
|
|
}), |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
pub fn techblox(interaction: &Interaction) -> InteractionResponse { |
|
|
|
let cmd = interaction.cmd().unwrap(); |
|
|
|
// build embed |
|
|
|
let embed = Embed { |
|
|
|
title: Some("TechbloxModdingAPI and GCIPA".to_string()), |
|
|
|
type_: None, |
|
|
|
description: Some( |
|
|
|
"Techblox is the latest iteration of Freejam's new sandbox game. \ |
|
|
|
This iterative approach allows us to reuse some mod tools from Gamecraft like GCIPA. \ |
|
|
|
TechbloxModdingAPI is a standard API that most mods use to interface with Techblox, \ |
|
|
|
which is also adapted from it's Gamecraft counterpart. |
|
|
|
|
|
|
|
GCIPA patches Techblox so that it will load compatible mods. \ |
|
|
|
To install GCIPA, download the [latest release](https://git.exmods.org/modtainers/GCIPA/releases), \ |
|
|
|
then follow [steps 2 through 4](https://git.exmods.org/modtainers/GCIPA/releases) \ |
|
|
|
or ask for more in-depth instructions. \ |
|
|
|
Once GCIPA is installed, \ |
|
|
|
download the latest version of [TechbloxModdingAPI](https://git.exmods.org/modtainers/GamecraftModdingAPI/releases) and place it in the Plugins folder in your Techblox install folder." |
|
|
|
.to_string()), |
|
|
|
url: None, |
|
|
|
timestamp: None, |
|
|
|
color: Some(0x00C800), // Colour::from_rgb(0, 200, 0) |
|
|
|
footer: Some(EmbedFooter { |
|
|
|
text: "NGnius".to_string(), |
|
|
|
icon_url: Some("https://git.exmods.org/user/avatar/NGnius/-1".to_string()), |
|
|
|
proxy_icon_url: None, |
|
|
|
}), |
|
|
|
image: None, |
|
|
|
thumbnail: None, |
|
|
|
video: None, |
|
|
|
provider: None, |
|
|
|
author: Some(EmbedAuthor { |
|
|
|
name: Some("Techblox Modding Overview".to_string()), |
|
|
|
url: Some("https://exmods.org/".to_string()), |
|
|
|
icon_url: None, |
|
|
|
proxy_icon_url: None |
|
|
|
}), |
|
|
|
fields: Some(vec![ |
|
|
|
EmbedField { |
|
|
|
name: "GCIPA".to_string(), |
|
|
|
value: "[view releases](https://git.exmods.org/modtainers/GCIPA/releases)".to_string(), |
|
|
|
inline: Some(true), |
|
|
|
}, |
|
|
|
EmbedField { |
|
|
|
name: "TechbloxModdingAPI".to_string(), |
|
|
|
value: "[view release](https://git.exmods.org/modtainers/GamecraftModdingAPI/releases)".to_string(), |
|
|
|
inline: Some(true), |
|
|
|
}, |
|
|
|
EmbedField { |
|
|
|
name: "Mods".to_string(), |
|
|
|
value: "[view list](https://exmods.org/mods/)".to_string(), |
|
|
|
inline: Some(true), |
|
|
|
}, |
|
|
|
]) |
|
|
|
}; |
|
|
|
InteractionResponse::ChannelMessageWithSource { |
|
|
|
data: Some(InteractionApplicationCommandCallbackData { |
|
|
|
tts: false, |
|
|
|
content: "".to_string(), |
|
|
|
allowed_mentions: None, |
|
|
|
embeds: Some(vec![embed]), |
|
|
|
flags: flag_by_user(&cmd.member.user.unwrap().id), |
|
|
|
}), |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
fn flag_by_user(id: &str) -> Option<usize> { |
|
|
|
if id == "106537989684887552" /* NGnius */ { |
|
|
|
return None; |
|
|
|
} else { |
|
|
|
return Some(64); |
|
|
|
} |
|
|
|
} |