This repository was archived by the owner on May 15, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +66
-1
lines changed Expand file tree Collapse file tree 5 files changed +66
-1
lines changed Original file line number Diff line number Diff line change
1
+ lib /
2
+ node_modules /
3
+ .merlin
4
+ .DS_Store
5
+ npm-debug.log
Original file line number Diff line number Diff line change 1
1
# bs-discord.js
2
- BuckleScript bindings for discord.js
2
+ BuckleScript bindings for [ discord.js] ( https://www.npmjs.com/package/discord.js )
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " discord" ,
3
+ "sources" : [" src" ],
4
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " bs-discord.js" ,
3
+ "version" : " 0.0.1" ,
4
+ "description" : " BuckleScript bindings for discord.js" ,
5
+ "main" : " index.js" ,
6
+ "scripts" : {
7
+ "test" : " echo \" Error: no test specified\" && exit 1"
8
+ },
9
+ "repository" : {
10
+ "type" : " git" ,
11
+ "url" : " git+https://github.com/BuckleTypes/bs-discord.js.git"
12
+ },
13
+ "keywords" : [
14
+ " discord" ,
15
+ " discord.js" ,
16
+ " bucklescript"
17
+ ],
18
+ "author" : " " ,
19
+ "license" : " ISC" ,
20
+ "bugs" : {
21
+ "url" : " https://github.com/BuckleTypes/bs-discord.js/issues"
22
+ },
23
+ "homepage" : " https://github.com/BuckleTypes/bs-discord.js#readme" ,
24
+ "dependencies" : {
25
+ "discord.js" : " ^11.0.0"
26
+ }
27
+ }
Original file line number Diff line number Diff line change
1
+ type client ;
2
+
3
+ type message ;
4
+
5
+ type user ;
6
+
7
+ type channel ;
8
+
9
+ external createClient : unit => client = "Client" [@@ bs . module "discord.js" ] [@@ bs . new ];
10
+
11
+ external login : client => string => unit = "" [@@ bs . send ];
12
+
13
+ external onReady : client => _ [@ bs . as "ready" ] => (unit => unit ) => unit = "on" [@@ bs . send ];
14
+
15
+ external onMessage : client => _ [@ bs . as "message" ] => (message => unit ) => unit =
16
+ "on" [@@ bs . send ];
17
+
18
+ external getContent : message => string = "content" [@@ bs . get ];
19
+
20
+ external getChannel : message => channel = "channel" [@@ bs . get ];
21
+
22
+ external getType : channel => string = "type" [@@ bs . get ];
23
+
24
+ external getAuthor : message => option user =
25
+ "author" [@@ bs . get ] [@@ bs . return null_undefined_to_opt];
26
+
27
+ external isBot : user => bool = "bot" [@@ bs . get ];
28
+
29
+ external reply : message => string => unit = "" [@@ bs . send ];
You can’t perform that action at this time.
0 commit comments