Last active
August 29, 2020 02:39
-
-
Save appellation/d90018dbe84d110d6fb83b1646a92367 to your computer and use it in GitHub Desktop.
This file contains 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
let foo = "bar"; | |
export foo; |
This file contains 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
fn MESSAGE_CREATE(message) { | |
import "discord" as discord; | |
import "https://gist.github.com/appellation/d90018dbe84d110d6fb83b1646a92367/raw/84a6fb20ab6d7f893efce9efd8675c3220d7d345/foo.rhai" as foo; | |
debug(message); | |
if message.author.has("bot") && message.author.bot { | |
return; | |
} | |
if message.content.index_of("!say") == 0 { | |
discord::reply(message, foo::foo + message.content.sub_string(4)); | |
} else if message.content == "!smile" { | |
print(":)"); | |
discord::react(message, "😄"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment