Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9cfcb0d09c | |||
| cc55b3e1d1 | |||
| a9a08e656f |
+1
-1
@@ -2,7 +2,7 @@
|
||||
name = "soundfx-rs"
|
||||
description = "Discord bot for custom sound effects and soundboards"
|
||||
license = "AGPL-3.0-only"
|
||||
version = "1.5.7"
|
||||
version = "1.5.8"
|
||||
authors = ["jellywx <judesouthworth@pm.me>"]
|
||||
edition = "2018"
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
*
|
||||
!.gitignore
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
id -u soundfx &>/dev/null || useradd -r -M soundfx
|
||||
|
||||
if [ ! -f /etc/soundfx-rs/config.env ]; then
|
||||
cp /etc/soundfx-rs/default.env /etc/soundfx-rs/config.env
|
||||
fi
|
||||
|
||||
chown soundfx /etc/soundfx-rs/config.env
|
||||
|
||||
#DEBHELPER#
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
id -u soundfx &>/dev/null || userdel soundfx
|
||||
|
||||
if [ -f /etc/soundfx-rs/config.env ]; then
|
||||
rm /etc/soundfx/config.env
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
+2
-2
@@ -68,8 +68,8 @@ pub async fn register_application_commands(
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||
if Path::new("/etc/soundfx-rs/default.env").exists() {
|
||||
dotenv::from_path("/etc/soundfx-rs/default.env").unwrap();
|
||||
if Path::new("/etc/soundfx-rs/config.env").exists() {
|
||||
dotenv::from_path("/etc/soundfx-rs/config.env").unwrap();
|
||||
}
|
||||
|
||||
env_logger::init();
|
||||
|
||||
+1
-8
@@ -409,14 +409,7 @@ WHERE
|
||||
&self,
|
||||
db_pool: impl Executor<'_, Database = Database>,
|
||||
) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||
sqlx::query!(
|
||||
"
|
||||
DELETE
|
||||
FROM sounds
|
||||
WHERE id = ?
|
||||
",
|
||||
self.id
|
||||
)
|
||||
sqlx::query!("DELETE FROM sounds WHERE id = ?", self.id)
|
||||
.execute(db_pool)
|
||||
.await?;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Description=Discord bot for custom sound effects and soundboards
|
||||
|
||||
[Service]
|
||||
User=soundfx
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/soundfx-rs
|
||||
WorkingDirectory=/etc/soundfx-rs
|
||||
|
||||
Reference in New Issue
Block a user