Added Service files, Fixed terminal bug

This commit is contained in:
Neshura 2023-07-03 19:22:02 +02:00
parent 06b90cb5bf
commit f20dbe247c
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C
2 changed files with 13 additions and 0 deletions

8
automod.service Normal file
View file

@ -0,0 +1,8 @@
[Unit]
Description="Automod for bookwormstory.social"
[Service]
User=server
WorkingDirectory=/home/server
ExecStart=/usr/bin/screen -dmS automod /home/server/automod
Type=forking

View file

@ -131,6 +131,8 @@ fn run_bot(mut terminal: Terminal<CrosstermBackend<&io::Stdout>>) {
// Enter a loop (not for debugging)
loop {
let _ = enable_raw_mode();
let _ = execute!(terminal.backend_mut(), EnterAlternateScreen, EnableMouseCapture);
this.run_once(old);
// Update UI
@ -150,6 +152,9 @@ fn run_bot(mut terminal: Terminal<CrosstermBackend<&io::Stdout>>) {
this.idle();
}
}
fn ui<B: Backend>(f: &mut Frame<B>, state: &Bot) {