File tree 5 files changed +82
-7
lines changed
5 files changed +82
-7
lines changed Original file line number Diff line number Diff line change 1
- # ComputerCraft Code Critic Bot
1
+ # ComputerCraft Code Critic Bot (C4Bot)
2
2
3
3
### Discord bot which attempts to help new programmers to code in lua
4
+
5
+ Currently, C4Bot only indirectly runs CCEmuX. However, the eventual goal of this project
6
+ is to evaluate a given ComputerCraft: Tweaked lua script from either discord or pastebin and
7
+ evaluate the scripts complexity (Did it use deprecated functions? Did it remember to use the local scope?).
8
+
9
+ ### License
10
+ [ License.txt] ( License.txt )
11
+
12
+ ### Contributors
13
+ Lupus590
14
+
15
+ EveryOS
16
+
17
+ YOU! (Maybe)
18
+
19
+ ### Special Thanks To
20
+ SquidDev - Converted ComputerCraft to ComputerCraft: Tweaked and wrote CCEmuX.
21
+ Additionally, was a large help with getting gradle to work.
22
+
23
+ Dan200 - Initial developer of ComputerCraft
24
+
25
+ Other ComputerCraft and ComputerCraft: Tweaked contributors
26
+
27
+ Referenced sites of this project (e.g. https://discordapp.com , https://pastebin.com )
28
+
29
+ GitHub, and also Linus Torvalds - Git
30
+
31
+ Shadow, a gradle plugin
32
+
33
+ The people who wrote Gradle, also the people who came up with the idea of a ReadMe
34
+
35
+ Oracle & Sun - Java 1.8
36
+
37
+ Eclipse and IntelliJ - IDEs
38
+
39
+ etc, etc, you get it.
40
+
41
+ And YOU!
42
+
43
+ ### Building and running
44
+ ``` cd CCEmuX
45
+ ./gradlew build
46
+ cd ..
47
+ ./gradlew build
48
+ cd build/libs
49
+ java -jar Lupus590.C4Bot-<VERSION>.jar
50
+ ```
51
+ Replace <VERSION > with the project version.
52
+ ```
Original file line number Diff line number Diff line change 1
- version ' 1.0-SNAPSHOT '
1
+ buildscript {
2
2
3
- apply plugin : ' java'
3
+ }
4
+
5
+ plugins {
6
+ id ' com.github.johnrengelman.shadow' version ' 2.0.1'
7
+ id ' java'
8
+ }
9
+
10
+ version ' 0.0.1-SNAPSHOT'
4
11
5
12
sourceCompatibility = 1.8
6
13
14
+ allprojects {
7
15
repositories {
8
16
mavenCentral()
9
17
jcenter()
10
18
}
11
19
12
20
dependencies {
13
21
testCompile group : ' junit' , name : ' junit' , version : ' 4.12'
14
- compile ' net.dv8tion:JDA:3.8.1_454'
22
+ implementation ' net.dv8tion:JDA:3.8.1_454'
23
+ implementation files(' CCEmuX/build/libs/CCEmuX-1.0.0-cct.jar' )
24
+ file(' CCEmuX/build/libs/CCEmuX-1.0.0-cct.jar' )
25
+ }
15
26
}
16
27
28
+ apply plugin : ' com.github.johnrengelman.shadow'
29
+ apply plugin : ' java'
30
+
17
31
jar {
18
32
manifest {
19
33
attributes(
20
- " Class-Path" : configurations. compile. collect { it. getName() }. join(' ' ),
34
+ // "Class-Path": configurations.compile.collect { it.getName() }.join(' '),
35
+ // "Class-Path": '../../CCEmuX/build/libs/CCEmuX-1.0.0-cct.jar',
36
+ // "Class-Path": "com.github.jengelman.gradle.plugins:shadow:2.0.1",
21
37
" Main-Class" : " lupus590.c4bot.main.Main"
22
38
)
23
39
}
24
40
}
41
+
42
+ shadowJar {
43
+ classifier = null
44
+ }
45
+
46
+ // Thanks to squiddev
Original file line number Diff line number Diff line change 1
- package lupus590 . c4bot . main ;
1
+ package filters ;
2
2
//takes discord message as input and strips out everything that is not in code tags
3
3
4
4
public class CodeFilter {
Original file line number Diff line number Diff line change 1
- package lupus590 . c4bot . main ;
1
+ package listeners ;
2
2
import net .dv8tion .jda .core .entities .Message ;
3
3
import net .dv8tion .jda .core .events .message .MessageReceivedEvent ;
4
4
import net .dv8tion .jda .core .hooks .ListenerAdapter ;
Original file line number Diff line number Diff line change 1
1
package lupus590 .c4bot .main ;
2
2
import java .io .File ;
3
3
4
+ import listeners .MessageListener ;
5
+ import net .clgd .ccemux .init .Launcher ;
4
6
import net .dv8tion .jda .core .JDA ;
5
7
import net .dv8tion .jda .core .JDABuilder ;
6
8
7
9
public class Main {
8
10
public static void main (String [] args ) throws Exception
9
11
{
12
+ Launcher .main (new String [] {});
13
+
10
14
String token = null ;
11
15
if (args .length == 0 ) {
12
16
File f = new File ("./config.xml" );
You can’t perform that action at this time.
0 commit comments