From ca91cf2c0c9908fe659f4c76e223c908c2befc3c Mon Sep 17 00:00:00 2001 From: Michael De Roover Date: Wed, 3 Feb 2021 13:22:29 +0100 Subject: [PATCH] Remove fdebug function --- konata.sh | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/konata.sh b/konata.sh index 8ced7c4..b6346f8 100755 --- a/konata.sh +++ b/konata.sh @@ -53,16 +53,12 @@ sendpic(){ } # Debugging commands -fdebug(){ - debug "Entered function $1()." -} debug(){ [ ! -z $debug ] && echo "[DEBUG] $1" >&2 } # Public commands help(){ - fdebug "help" sendmsg "Hiya! I'm [ghnou](https://t.me/ghnou)'s personal bot, Konata. Currently I have the following features: - /help - Show this help message. @@ -81,12 +77,10 @@ help(){ } alive(){ - fdebug "alive" sendmsg "Alive and well!" } cv(){ - fdebug "cv" stats=$(curl -s "https://corona.lmao.ninja/v2/countries/$args") country=$(jq -r '.country' <<< $stats) cases=$(jq -r '.todayCases' <<< $stats) @@ -101,12 +95,10 @@ cv(){ } id(){ - fdebug "id" sendmsg "Chat ID: $chat" } ud(){ - fdebug "ud" enc=$(echo "$args" | sed "s/\ /%20/g") res=$(curl -s "https://api.urbandictionary.com/v0/define?term=$enc") if jq -re '.list[0].definition' <<< $res @@ -123,7 +115,6 @@ ud(){ } konata(){ - fdebug "konata" data=$(curl -s "https://konachan.net/post.json?limit=1&page=1&tags=order:random%20izumi_konata") jpeg=$(jq -r '.[0].jpeg_url' <<< $data) file=$(jq -r '.[0].file_url' <<< $data) @@ -136,14 +127,12 @@ konata(){ fi } repo(){ - fdebug "repo" sendmsg "You can find my source code [here](https://git.ghnou.su/ghnou/konata)." } # Administrative mp3(){ admin - fdebug "mp3" tmp="/tmp/mp3" [ -d $tmp ] && mkdir $tmp sendmsg "Downloading, this might take a while..." @@ -160,7 +149,6 @@ mp3(){ stat(){ admin - fdebug "stat" total=$(grep MemTotal /proc/meminfo | awk '{print $2}') avail=$(grep MemAvailable /proc/meminfo | awk '{print $2}') used=$(bc <<< "$total-$avail") @@ -171,7 +159,6 @@ stat(){ term(){ admin - fdebug "term" sendmsg "\`$(whoami)@${HOSTNAME}:${PWD}$\` \`$args\` \`$(echo $args | bash - 2>&1)\`" }