File tree 5 files changed +41
-33
lines changed 5 files changed +41
-33
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,14 @@ fabric.properties
78
78
# .idea/misc.xml
79
79
# *.ipr
80
80
81
+ # BEGIN EveryOS
82
+ # ## Eclipse ###
83
+ .settings /
84
+ bin /
85
+ .project
86
+ .classpath
87
+ # END EveryOS
88
+
81
89
# Sonarlint plugin
82
90
.idea /sonarlint
83
91
Original file line number Diff line number Diff line change
1
+ package lupus509 .c4bot .main ;
1
2
//takes discord message as input and strips out everything that is not in code tags
2
3
3
4
public class CodeFilter {
4
5
5
- public static string filter (string rawMessage )
6
+ public static String filter (String rawMessage )
6
7
{
7
- //todo
8
- string code = rawMessage ;
8
+ String code = rawMessage ;
9
9
10
10
return code ;
11
11
}
Original file line number Diff line number Diff line change
1
+ package lupus509 .c4bot .main ;
2
+ import java .io .File ;
3
+
4
+ import net .dv8tion .jda .core .JDA ;
5
+ import net .dv8tion .jda .core .JDABuilder ;
6
+
7
+ public class Main {
8
+ public static void main (String [] args ) throws Exception
9
+ {
10
+ String token = null ;
11
+ if (args .length == 0 ) {
12
+ File f = new File ("./config.xml" );
13
+ if (f .isFile ()) {
14
+ //Some code
15
+ }
16
+ if (token == null ) {
17
+ System .out .println ("Please run again passing in a bot token" );
18
+ return ;
19
+ }
20
+ } else {
21
+ token = args [0 ];
22
+ }
23
+
24
+ System .out .println ("Using Discord bot token: " +token );
25
+ JDA jda = new JDABuilder (args [0 ]).build ();
26
+ jda .addEventListener (new MessageListener ());
27
+ }
28
+ }
Original file line number Diff line number Diff line change 1
- import net .dv8tion .jda .client .entities .Group ;
2
- import net .dv8tion .jda .core .JDA ;
3
- import net .dv8tion .jda .core .JDABuilder ;
4
- import net .dv8tion .jda .core .Permission ;
5
- import net .dv8tion .jda .core .entities .*;
1
+ package lupus509 .c4bot .main ;
2
+ import net .dv8tion .jda .core .entities .Message ;
6
3
import net .dv8tion .jda .core .events .message .MessageReceivedEvent ;
7
- import net .dv8tion .jda .core .exceptions .PermissionException ;
8
- import net .dv8tion .jda .core .exceptions .RateLimitedException ;
9
4
import net .dv8tion .jda .core .hooks .ListenerAdapter ;
10
5
11
6
public class MessageListener extends ListenerAdapter
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments