Created
April 10, 2018 19:20
-
-
Save brecert/058d62c9955d09c8fa3d9e7ab91abc7f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$${ | |
STRIP(&command,$$[command]); | |
&p = "" | |
ifmatches(%&command%,"%&p%mention|%&p%messages|%&p%mail"); | |
arraysize(@&mentionlast[],#s) | |
IF(%#s% = 0); | |
toast("hint","keys","No Messages","No Messages to Display",50) | |
STOP; | |
ENDIF; | |
IF(%#s% = 1); | |
unset(&isp); | |
ELSE; | |
&isp = "s" | |
ENDIF; | |
log("&7You have %#s% Message%&isp% :") | |
#s = ((%#s%) - 1) | |
for(#i,0,%#s%) | |
#id = ((%#i%) + 1) | |
log("&8[&6%#id%&8] &8[&7%@&mentiondate%&8 minute%&isp% ago] %@&mentionlast[%#i%]%"); | |
next; | |
STOP; | |
endif; | |
ifmatches(%&command%,"%&p%tells|whispers"); | |
arraysize(@&tellast[],#s) | |
IF(%#s% = 0); | |
toast("hint","keys","No Whispers","No Whispers to Display",50) | |
STOP; | |
ENDIF; | |
log("&7You have %#s% Whispers%&isp% :") | |
#s = ((%#s%) - 1) | |
for(#i,0,%#s%) | |
#id = ((%#i%) + 1) | |
log("&8[&6%#id%&8] &8[&7%@&telldate[%#i%]%&8 minute%&isp% ago] %@&tellast[%#i%]%"); | |
next; | |
STOP; | |
endif; | |
ifmatches(%&command%,"%&p%clear"); | |
arraysize(@&mentionlast[],#s) | |
IF(%#s% = 0); | |
toast("hint","keys","Nothing to Clear","No Messages to Clear",50) | |
STOP; | |
ELSEIF(%#s% = 1); | |
unset(&isp) | |
ELSE; | |
&isp = "s" | |
ENDIF; | |
toast("tutorial","keys","Cleared %#s% Message%&isp%.","",50) | |
unset(@&mentionlast[]) | |
unset(@&mentiondate[]) | |
STOP; | |
endif; | |
ifmatches(%&command%,"%&p%shrug"); | |
echo("¯\_(ツ)_/¯") | |
STOP; | |
endif; | |
log("No Match for Command : %&command%") | |
}$$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment