Skip to content

Commit

Permalink
change log channel
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMaxium69 committed Nov 14, 2021
1 parent 47efeef commit 442f052
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group 'fr.tyrolium.maxime.bot'
version '0.4.0-BETA'
version '0.6.1-BETA'

repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fr/tyrolium/maxime/bot/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
public class Main {

// PROD or DEV
public static String APP_ENV = "DEV";
public static String APP_ENV = "PROD";

public static void main(String[] argv) throws LoginException {
System.out.println("BOT = Initialization");
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/fr/tyrolium/maxime/bot/message.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ public void onMessageReceived(@Nonnull MessageReceivedEvent event) {

Boolean isCmd = app.System(eventDate, eventGuild.getName(), eventChannel, eventUser.getAsTag(), eventMsg.getContentRaw(), event, prefix);
if (isCmd) { command.init(eventMsg.getContentRaw().toLowerCase().substring(2), eventChannel, eventUser, eventGuild, eventMsg, event, eventDate); }
else { notprefix.init(eventMsg.getContentRaw().toLowerCase(), eventChannel, eventUser, eventGuild); }

else { notprefix.init(eventMsg.getContentRaw().toLowerCase(), eventChannel, eventUser, eventGuild, event); }
}

}
16 changes: 12 additions & 4 deletions src/main/java/fr/tyrolium/maxime/bot/notprefix.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
package fr.tyrolium.maxime.bot;

import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.MessageChannel;
import net.dv8tion.jda.api.entities.User;
import net.dv8tion.jda.api.entities.*;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;

public class notprefix {
public static void init(String eventMsg, MessageChannel channel, User user, Guild guild){
public static void init(String eventMsg, MessageChannel channel, User user, Guild guild, MessageReceivedEvent event){

/*vive tyrolium*/
if (eventMsg.equals("vive tyrolium") && guild.getId().equals(stock.guildTyro)){ vt(channel); }

if (eventMsg.equals("je t'aime") && user.getId().equals(stock.userPapa)){ jtm(channel); }

if (eventMsg.equals("``serveur offline``") && user.getId().equals(stock.userFrere)){ online(event); }

}

public static void vt(MessageChannel channel){
Expand All @@ -23,4 +24,11 @@ public static void jtm(MessageChannel channel){
String msg = ":heart:";
app.send(channel, msg);
}

public static void online(MessageReceivedEvent event){
String msg = "<@!363366883652796416> verifie le serveur s'il te plait";
TextChannel chanAlert = event.getJDA().getTextChannelById(stock.alertChannel);

app.send(chanAlert, msg);
}
}
12 changes: 5 additions & 7 deletions src/main/java/fr/tyrolium/maxime/bot/stock.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package fr.tyrolium.maxime.bot;

import java.nio.channels.Channel;
import java.util.Scanner;

public class stock {
//Guild
public static String guildTyro = "772171741782343690";
public static String guildTeamsDev = "865160943498297356";

//User
public static String userPapa = "363366883652796416";
public static String userFrere = "849915439844687893";
public static String userRayqua = "384436295717617665";
public static String userChristophe = "781509903718023208";
public static String userJessica = "424805452115869697";
Expand Down Expand Up @@ -37,9 +35,9 @@ public class stock {
public static String playing = "tyrolium.fr | Prefix = t! | En Developpement";
public static String playingDev = "Dev le bot";

//Techno
public static Scanner scanner = new Scanner(System.in);

//Channel
public static String logChannel = "908460977379504208";
public static String logChannel = "909566707658539096";
public static String alertChannel = "909576821220196433";
public static String sniffChannel = "909567130310152202";

}

0 comments on commit 442f052

Please sign in to comment.