Merge pull request #644 from BBN-Holding/greg-dev

v2.0.2
This commit is contained in:
Skidder 2021-04-15 08:20:59 +02:00 committed by GitHub
commit ba5757fe05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 23 deletions

View file

@ -1,5 +1,5 @@
blank_issues_enabled: false blank_issues_enabled: false
contact_links: contact_links:
- name: BigBotNetwork Discord Support - name: BBN Holding Discord Support
url: https://discord.gg/nPwjaJk url: https://discord.gg/nPwjaJk
about: Please ask questions here. about: Please ask questions here.

View file

@ -3,13 +3,13 @@
Hadder Discord is a multi-purpose Discord bot with 100% uptime. Hadder Discord is a multi-purpose Discord bot with 100% uptime.
<a href="https://discord.gg/nPwjaJk"><img src="https://discord.com/api/guilds/757966278936756345/embed.png"/></a> <a href="https://discord.gg/nPwjaJk"><img src="https://discord.com/api/guilds/757966278936756345/embed.png"/></a>
[![Build Status](https://github.com/BigBotNetwork/Hadder/workflows/Hadder/badge.svg)](https://github.com/BigBotNetwork/Hadder) [![Build Status](https://github.com/BBN-Holding/Hadder/workflows/Hadder/badge.svg)](https://github.com/BBN-Holding/Hadder)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ddb8cb7ec85f467caa691c175e1f01b5)](https://www.codacy.com/gh/BigBotNetwork/Hadder?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=BigBotNetwork/Hadder&amp;utm_campaign=Badge_Grade) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/ddb8cb7ec85f467caa691c175e1f01b5)](https://www.codacy.com/gh/BBN-Holding/Hadder?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=BBN-Holding/Hadder&amp;utm_campaign=Badge_Grade)
[![CodeFactor](https://www.codefactor.io/repository/github/bigbotnetwork/hadder/badge)](https://www.codefactor.io/repository/github/bigbotnetwork/hadder) [![CodeFactor](https://www.codefactor.io/repository/github/bigbotnetwork/hadder/badge)](https://www.codefactor.io/repository/github/bigbotnetwork/hadder)
[![Crowdin](https://badges.crowdin.net/e/bc0babde730eb3eada34778502a31b03/localized.svg)](https://bbn.crowdin.com/hadder) [![Crowdin](https://badges.crowdin.net/e/bc0babde730eb3eada34778502a31b03/localized.svg)](https://bbn.crowdin.com/hadder)
[![GitHub issues](https://img.shields.io/github/issues/BigBotNetwork/Hadder)](https://github.com/BigBotNetwork/Hadder/issues) [![GitHub issues](https://img.shields.io/github/issues/BBN-Holding/Hadder)](https://github.com/BBN-Holding/Hadder/issues)
[![GitHub license](https://img.shields.io/github/license/BigBotNetwork/Hadder)](https://github.com/BigBotNetwork/Hadder/blob/master/LICENSE) [![GitHub license](https://img.shields.io/github/license/BBN-Holding/Hadder)](https://github.com/BBN-Holding/Hadder/blob/master/LICENSE)
[![time tracker](https://wakatime.com/badge/github/BigBotNetwork/Hadder.svg)](https://wakatime.com/badge/github/BigBotNetwork/Hadder) [![time tracker](https://wakatime.com/badge/github/BBN-Holding/Hadder.svg)](https://wakatime.com/badge/github/BBN-Holding/Hadder)
## Hadder Team ## Hadder Team
### Developer ### Developer

12
pom.xml
View file

@ -6,11 +6,11 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>Hadder</groupId> <groupId>Hadder</groupId>
<artifactId>Hadder</artifactId> <artifactId>Hadder</artifactId>
<version>2.0.1</version> <version>2.0.2</version>
<name>Hadder</name> <name>Hadder</name>
<inceptionYear>2019</inceptionYear> <inceptionYear>2019</inceptionYear>
<description>Hadder is a multi-purpose Discord bot.</description> <description>Hadder is a multi-purpose Discord bot.</description>
<url>https://github.com/BigBotNetwork/Hadder</url> <url>https://github.com/BBN-Holding/Hadder</url>
<licenses> <licenses>
<license> <license>
@ -64,7 +64,7 @@
<dependency> <dependency>
<groupId>org.apache.maven</groupId> <groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId> <artifactId>maven-model</artifactId>
<version>3.6.3</version> <version>3.8.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.dv8tion</groupId> <groupId>net.dv8tion</groupId>
@ -89,7 +89,7 @@
<dependency> <dependency>
<groupId>org.kohsuke</groupId> <groupId>org.kohsuke</groupId>
<artifactId>github-api</artifactId> <artifactId>github-api</artifactId>
<version>1.125</version> <version>1.127</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.sedmelluq</groupId> <groupId>com.sedmelluq</groupId>
@ -99,12 +99,12 @@
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId> <artifactId>jackson-annotations</artifactId>
<version>2.12.2</version> <version>2.12.3</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.mongodb</groupId> <groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-sync</artifactId> <artifactId>mongodb-driver-sync</artifactId>
<version>4.2.2</version> <version>4.2.3</version>
</dependency> </dependency>
</dependencies> </dependencies>

View file

@ -47,7 +47,7 @@ public class FeedbackCommand implements Command {
String description = e2.getMessage().getContentDisplay(); String description = e2.getMessage().getContentDisplay();
try { try {
GitHub connection = GitHub.connectUsingOAuth(e.getConfig().getGitHubToken()); GitHub connection = GitHub.connectUsingOAuth(e.getConfig().getGitHubToken());
GHRepository Hadder = connection.getOrganization("BigBotNetwork").getRepository("Hadder"); GHRepository Hadder = connection.getOrganization("BBN-Holding").getRepository("Hadder");
GHIssue issue = Hadder.createIssue(title).body("<strong>Feedback by " + e.getAuthor().getAsTag() + "</strong><br>" + description).label("feedback").create(); GHIssue issue = Hadder.createIssue(title).body("<strong>Feedback by " + e.getAuthor().getAsTag() + "</strong><br>" + description).label("feedback").create();
issue.addLabels("feedback"); issue.addLabels("feedback");
e.getTextChannel().sendMessage( e.getTextChannel().sendMessage(

View file

@ -78,6 +78,7 @@ public class CommandListener extends ListenerAdapter {
} }
} }
} else { } else {
try {
e.getAuthor().openPrivateChannel().complete().sendMessage(new EmbedBuilder() e.getAuthor().openPrivateChannel().complete().sendMessage(new EmbedBuilder()
.setTitle("No permission") .setTitle("No permission")
.setDescription("I need the `MESSAGE WRITE` permission in order to work!") .setDescription("I need the `MESSAGE WRITE` permission in order to work!")
@ -85,6 +86,8 @@ public class CommandListener extends ListenerAdapter {
.setFooter("Hadder", "https://bbn.one/images/Hadder.png") .setFooter("Hadder", "https://bbn.one/images/Hadder.png")
.setTimestamp(Instant.now()) .setTimestamp(Instant.now())
.build()).queue(); .build()).queue();
} catch (ErrorResponseException ignore) {}
} }
} }
} }

View file

@ -53,7 +53,7 @@ public class MentionListener extends ListenerAdapter {
try { try {
GitHub connection = GitHub.connectUsingOAuth(config.getGitHubToken()); GitHub connection = GitHub.connectUsingOAuth(config.getGitHubToken());
GHRepository Hadder = connection.getOrganization("BigBotNetwork").getRepository("Hadder"); GHRepository Hadder = connection.getOrganization("BBN-Holding").getRepository("Hadder");
version = Hadder.getLatestRelease().getTagName(); version = Hadder.getLatestRelease().getTagName();
} catch (IOException ioException) { } catch (IOException ioException) {
ioException.printStackTrace(); ioException.printStackTrace();
@ -65,8 +65,7 @@ public class MentionListener extends ListenerAdapter {
.addField("User-Prefix", mongoUser.getPrefix(), true) .addField("User-Prefix", mongoUser.getPrefix(), true)
.addField("Guild-Prefix", mongoServer.getPrefix(), true) .addField("Guild-Prefix", mongoServer.getPrefix(), true)
.addField("Join our Dev Server!", "[Click here!](https://discord.gg/nPwjaJk)", true) .addField("Join our Dev Server!", "[Click here!](https://discord.gg/nPwjaJk)", true)
.addField("Github", "[Click here!](https://github.com/BigBotNetwork/Hadder)", false) .addField("Github", "[Click here!](https://github.com/BBN-Holding/Hadder)", false);
.addField("Twitch", "[Click here!](https://www.twitch.tv/bigbotnetwork)", false);
e.getChannel().sendMessage(builder.build()).queue(); e.getChannel().sendMessage(builder.build()).queue();
} else if (e.getMessage().getContentRaw().equalsIgnoreCase("@someone")) { } else if (e.getMessage().getContentRaw().equalsIgnoreCase("@someone")) {
int member = new Random().nextInt(e.getGuild().getMembers().size() - 1); int member = new Random().nextInt(e.getGuild().getMembers().size() - 1);