Remove needless env var from build
This commit is contained in:
parent
6a4782721a
commit
5bc6dfa667
|
@ -41,8 +41,6 @@ rustPlatform.buildRustPackage rec {
|
||||||
openssl
|
openssl
|
||||||
];
|
];
|
||||||
|
|
||||||
LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs;
|
|
||||||
|
|
||||||
cargoLock = {
|
cargoLock = {
|
||||||
lockFile = ../Cargo.lock;
|
lockFile = ../Cargo.lock;
|
||||||
outputHashes = {
|
outputHashes = {
|
||||||
|
|
|
@ -29,18 +29,24 @@ async fn main() -> anyhow::Result<()> {
|
||||||
Box::pin(async {
|
Box::pin(async {
|
||||||
let global_prefix = std::env::var("SHIMMERING_GLOBAL_PREFIX");
|
let global_prefix = std::env::var("SHIMMERING_GLOBAL_PREFIX");
|
||||||
if message.author.bot || Into::<u64>::into(message.author.id) == 1 {
|
if message.author.bot || Into::<u64>::into(message.author.id) == 1 {
|
||||||
Ok(None)
|
return Ok(None);
|
||||||
} else if let Ok(global_prefix) = global_prefix {
|
|
||||||
Ok(Some(message.content.split_at(global_prefix.len())))
|
|
||||||
} else if message.guild_id.is_none() {
|
|
||||||
if message.content.trim().is_empty() {
|
|
||||||
Ok(Some(("", "score magic")))
|
|
||||||
} else {
|
|
||||||
Ok(Some(("", &message.content[..])))
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Ok(None)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let (Ok(global_prefix)) = global_prefix {
|
||||||
|
if message.content.starts_with(global_prefix) {
|
||||||
|
return Ok(Some(message.content.split_at(global_prefix.len())));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if message.guild_id.is_none() {
|
||||||
|
if message.content.trim().is_empty() {
|
||||||
|
return Ok(Some(("", "score magic")));
|
||||||
|
} else {
|
||||||
|
return Ok(Some(("", &message.content[..])));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Ok(None);
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
edit_tracker: Some(Arc::new(poise::EditTracker::for_timespan(
|
edit_tracker: Some(Arc::new(poise::EditTracker::for_timespan(
|
||||||
|
|
Loading…
Reference in a new issue