Skip to content

Commit

Permalink
fixed malformatted markdown in message, stats posting on startup twic…
Browse files Browse the repository at this point in the history
…e & votes posting for botsfordiscord.com
  • Loading branch information
topi314 committed Feb 22, 2021
1 parent 5c8d2c9 commit 625f39e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
implementation 'net.dv8tion:JDA:4.2.0_228'
implementation 'com.jagrosh:jda-utilities:3.0.5'
implementation 'club.minnced:discord-webhooks:0.5.4'
implementation 'com.github.caneleex:BotListHandler:1.0.6'
implementation 'com.github.caneleex:BotListHandler:1.0.7'

// audio
implementation("com.github.KittyBot-Org:Lavalink-Client:94660b3") {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/de/kittybot/kittybot/main/KittyBot.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public KittyBot() throws IOException, MissingConfigValuesException, LoginExcepti
Config.init("./config.json");
var modules = new Modules(this);
var botListHandler = new BLHBuilder()
.setUnavailableEventsEnabled(false)
.setDevModePredicate(jda -> Environment.is(Environment.DEVELOPMENT))
.addBotList(BotList.TOP_GG, Config.TOP_GG_TOKEN)
.addBotList(BotList.DBOATS, Config.DISCORD_BOATS_TOKEN)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/kittybot/kittybot/modules/VoteModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void addVote(long userId, BotList botList, int voteMultiplier){
.execute();

var jda = this.modules.getJDA();
jda.retrieveUserById(userId).queue(user -> this.modules.get(EventLogModule.class).send(jda, "Vote", "´" + user.getAsTag() + "`(`" + user.getId() + "`) voted on " + MessageUtils.maskLink("`" + botList.getName() + "`", botList.getUrl())));
jda.retrieveUserById(userId).queue(user -> this.modules.get(EventLogModule.class).send(jda, "Vote", "`" + user.getAsTag() + "`(`" + user.getId() + "`) voted on " + MessageUtils.maskLink("`" + botList.getName() + "`", botList.getUrl())));

var guild = this.modules.getGuildById(Config.SUPPORT_GUILD_ID);
if(guild == null){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public enum BotList{

DISCORD_BOATS("Discord Boats", "https://discord.boats", Config.DISCORD_BOATS_TOKEN, 12, ChronoUnit.HOURS, "/bot/%s"),
BOTLIST_SPACE("botlist.space", "https://botlist.space", Config.BOTLIST_SPACE_TOKEN, 1, ChronoUnit.DAYS, "/bot/%s"),
BOTS_FOR_DISCORD_COM("Bots For Discord", "https://botsfordiscord.com", Config.BOTS_FOR_DISCORD_TOKEN, 1, ChronoUnit.DAYS, "/bot/%s"),
BOTS_FOR_DISCORD_COM("Bots For Discord", "https://botsfordiscord.com", Config.BOTS_FOR_DISCORD_WEBHOOK_TOKEN, 1, ChronoUnit.DAYS, "/bot/%s"),
DISCORD_BOTS_GG("Discord Bots", "https://discord.bots.gg"),
TOP_GG("Top.gg", "https://top.gg", Config.TOP_GG_TOKEN, 12, ChronoUnit.HOURS, "/bot/%s"),
DISCORD_EXTREME_LIST_XYZ("Delly", "https://discordextremelist.xyz"),
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/de/kittybot/kittybot/utils/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class Config{
public static String DISCORD_BOTS_TOKEN;
public static String BOTLIST_SPACE_TOKEN;
public static String BOTS_FOR_DISCORD_TOKEN;
public static String BOTS_FOR_DISCORD_WEBHOOK_TOKEN;
public static String DISCORD_BOT_LIST_TOKEN;
public static String DISCORD_SERVICES_TOKEN;

Expand Down Expand Up @@ -115,6 +116,7 @@ public static void init(String path) throws IOException, MissingConfigValuesExce
DISCORD_BOATS_TOKEN = getBotListToken(json, "discord_boats_token");
BOTLIST_SPACE_TOKEN = getBotListToken(json, "botlist_space_token");
BOTS_FOR_DISCORD_TOKEN = getBotListToken(json, "bots_for_discord_token");
BOTS_FOR_DISCORD_WEBHOOK_TOKEN = json.getString("bots_for_discord_webhook_token", "");
DISCORD_BOT_LIST_TOKEN = getBotListToken(json, "discord_bot_list_token");
DISCORD_SERVICES_TOKEN = getBotListToken(json, "discord_services_token");

Expand Down

0 comments on commit 625f39e

Please sign in to comment.