diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index fc7c567..dd0f986 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -8,5 +8,5 @@ CONTRIBUTING.md @EllieBotDevs/dev-team # Changes to the Issue templates need to be checked by the triage team /.github/ISSUE_TEMPLATE/ @EllieBotDevs/bug-testers -# This file is handled by TheBusyBiscuit (admins have overwrite access anyway) +# This file is handled by EmotionChild (admins have overwrite access anyway) /.github/CODEOWNERS @EmotionChild diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b7259b8..183afe1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,7 +5,7 @@ version: 2 updates: - - package-ecosystem: "npm" # See documentation for possible values + - package-ecosystem: "gradle" # See documentation for possible values directory: "/" # Location of package manifests schedule: interval: "daily" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index edb38e7..e7dc58a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -32,7 +32,7 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'javascript' ] + language: [ 'java' ] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] # Learn more: # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed @@ -89,4 +89,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 \ No newline at end of file + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml new file mode 100644 index 0000000..fe461b4 --- /dev/null +++ b/.github/workflows/dependency-review.yml @@ -0,0 +1,20 @@ +# Dependency Review Action +# +# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging. +# +# Source repository: https://github.com/actions/dependency-review-action +# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement +name: 'Dependency Review' +on: [pull_request] + +permissions: + contents: read + +jobs: + dependency-review: + runs-on: ubuntu-latest + steps: + - name: 'Checkout Repository' + uses: actions/checkout@v3 + - name: 'Dependency Review' + uses: actions/dependency-review-action@v2 diff --git a/.gradle/7.4/checksums/checksums.lock b/.gradle/7.4/checksums/checksums.lock new file mode 100644 index 0000000..069d47a Binary files /dev/null and b/.gradle/7.4/checksums/checksums.lock differ diff --git a/.gradle/7.4/checksums/md5-checksums.bin b/.gradle/7.4/checksums/md5-checksums.bin new file mode 100644 index 0000000..468bd82 Binary files /dev/null and b/.gradle/7.4/checksums/md5-checksums.bin differ diff --git a/.gradle/7.4/checksums/sha1-checksums.bin b/.gradle/7.4/checksums/sha1-checksums.bin new file mode 100644 index 0000000..b8adc0e Binary files /dev/null and b/.gradle/7.4/checksums/sha1-checksums.bin differ diff --git a/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock b/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock new file mode 100644 index 0000000..a980bd1 Binary files /dev/null and b/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock differ diff --git a/.gradle/7.4/dependencies-accessors/gc.properties b/.gradle/7.4/dependencies-accessors/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.gradle/7.4/executionHistory/executionHistory.bin b/.gradle/7.4/executionHistory/executionHistory.bin new file mode 100644 index 0000000..ef7a9b2 Binary files /dev/null and b/.gradle/7.4/executionHistory/executionHistory.bin differ diff --git a/.gradle/7.4/executionHistory/executionHistory.lock b/.gradle/7.4/executionHistory/executionHistory.lock new file mode 100644 index 0000000..58d0852 Binary files /dev/null and b/.gradle/7.4/executionHistory/executionHistory.lock differ diff --git a/.gradle/7.4/fileChanges/last-build.bin b/.gradle/7.4/fileChanges/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/.gradle/7.4/fileChanges/last-build.bin differ diff --git a/.gradle/7.4/fileHashes/fileHashes.bin b/.gradle/7.4/fileHashes/fileHashes.bin new file mode 100644 index 0000000..07eb288 Binary files /dev/null and b/.gradle/7.4/fileHashes/fileHashes.bin differ diff --git a/.gradle/7.4/fileHashes/fileHashes.lock b/.gradle/7.4/fileHashes/fileHashes.lock new file mode 100644 index 0000000..57dd14c Binary files /dev/null and b/.gradle/7.4/fileHashes/fileHashes.lock differ diff --git a/.gradle/7.4/gc.properties b/.gradle/7.4/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000..5dce505 Binary files /dev/null and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..ea098bc --- /dev/null +++ b/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Sat Aug 06 12:32:45 NZST 2022 +gradle.version=7.4 diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin new file mode 100644 index 0000000..0238bc6 Binary files /dev/null and b/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe new file mode 100644 index 0000000..5ccf30e Binary files /dev/null and b/.gradle/file-system.probe differ diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.idea/Ellie-bot.iml b/.idea/Ellie-bot.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/Ellie-bot.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..ba1ec5c --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__club_minnced_opus_java_api_1_1_0.xml b/.idea/libraries/Maven__club_minnced_opus_java_api_1_1_0.xml new file mode 100644 index 0000000..605178a --- /dev/null +++ b/.idea/libraries/Maven__club_minnced_opus_java_api_1_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__club_minnced_opus_java_natives_1_1_0.xml b/.idea/libraries/Maven__club_minnced_opus_java_natives_1_1_0.xml new file mode 100644 index 0000000..223bfd1 --- /dev/null +++ b/.idea/libraries/Maven__club_minnced_opus_java_natives_1_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_10_1.xml b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_10_1.xml new file mode 100644 index 0000000..81b7257 --- /dev/null +++ b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_10_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_10_1.xml b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_10_1.xml new file mode 100644 index 0000000..f1b25f9 --- /dev/null +++ b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_10_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_10_1.xml b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_10_1.xml new file mode 100644 index 0000000..bdf5b51 --- /dev/null +++ b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_10_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml b/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml new file mode 100644 index 0000000..1c380d0 --- /dev/null +++ b/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_neovisionaries_nv_websocket_client_2_14.xml b/.idea/libraries/Maven__com_neovisionaries_nv_websocket_client_2_14.xml new file mode 100644 index 0000000..5c48b38 --- /dev/null +++ b/.idea/libraries/Maven__com_neovisionaries_nv_websocket_client_2_14.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_squareup_okhttp3_okhttp_3_13_0.xml b/.idea/libraries/Maven__com_squareup_okhttp3_okhttp_3_13_0.xml new file mode 100644 index 0000000..9795533 --- /dev/null +++ b/.idea/libraries/Maven__com_squareup_okhttp3_okhttp_3_13_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_squareup_okio_okio_1_17_2.xml b/.idea/libraries/Maven__com_squareup_okio_okio_1_17_2.xml new file mode 100644 index 0000000..9260035 --- /dev/null +++ b/.idea/libraries/Maven__com_squareup_okio_okio_1_17_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_dv8tion_JDA_4_3_0_277.xml b/.idea/libraries/Maven__net_dv8tion_JDA_4_3_0_277.xml new file mode 100644 index 0000000..44f19d0 --- /dev/null +++ b/.idea/libraries/Maven__net_dv8tion_JDA_4_3_0_277.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_java_dev_jna_jna_4_4_0.xml b/.idea/libraries/Maven__net_java_dev_jna_jna_4_4_0.xml new file mode 100644 index 0000000..497fb5f --- /dev/null +++ b/.idea/libraries/Maven__net_java_dev_jna_jna_4_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_sf_trove4j_trove4j_3_0_3.xml b/.idea/libraries/Maven__net_sf_trove4j_trove4j_3_0_3.xml new file mode 100644 index 0000000..72d4d7e --- /dev/null +++ b/.idea/libraries/Maven__net_sf_trove4j_trove4j_3_0_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_commons_commons_collections4_4_1.xml b/.idea/libraries/Maven__org_apache_commons_commons_collections4_4_1.xml new file mode 100644 index 0000000..1e0b53d --- /dev/null +++ b/.idea/libraries/Maven__org_apache_commons_commons_collections4_4_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_jetbrains_annotations_16_0_1.xml b/.idea/libraries/Maven__org_jetbrains_annotations_16_0_1.xml new file mode 100644 index 0000000..3dd59d6 --- /dev/null +++ b/.idea/libraries/Maven__org_jetbrains_annotations_16_0_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_25.xml b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_25.xml new file mode 100644 index 0000000..20e8163 --- /dev/null +++ b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_25.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..230de26 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..0aa9425 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +devs@elliebot.net. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/src/main/java/net/ellibot/ellie/Main.java b/src/main/java/net/ellibot/ellie/Main.java new file mode 100644 index 0000000..ba2ebac --- /dev/null +++ b/src/main/java/net/ellibot/ellie/Main.java @@ -0,0 +1,7 @@ +package net.ellibot.ellie; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file diff --git a/src/main/java/net/elliebot/ellie/commands/UserInfoCommand.java b/src/main/java/net/elliebot/ellie/commands/UserInfoCommand.java new file mode 100644 index 0000000..0977fbc --- /dev/null +++ b/src/main/java/net/elliebot/ellie/commands/UserInfoCommand.java @@ -0,0 +1,4 @@ +package net.elliebot.ellie.commands; + +public class UserInfoCommand { +} diff --git a/src/main/java/net/elliebot/ellie/events/HelloEvent.java b/src/main/java/net/elliebot/ellie/events/HelloEvent.java new file mode 100644 index 0000000..8b434ab --- /dev/null +++ b/src/main/java/net/elliebot/ellie/events/HelloEvent.java @@ -0,0 +1,17 @@ +package net.elliebot.ellie.events; + +import net.dv8tion.jda.api.entities.Guild; +import net.dv8tion.jda.api.events.message.guild.GuildMessageReceivedEvent; +import net.dv8tion.jda.api.hooks.ListenerAdapter; + +public class HelloEvent extends ListenerAdapter { + + public void onGuildMessageReceived(GuildMessageReceivedEvent event){ + String messageSent = event.getMessage().getContentRaw(); + if(messageSent.equalsIgnoreCase("Hi")){ + event.getChannel().sendMessage("hello").queue(); + } + } + + +} diff --git a/src/main/java/net/elliebot/ellie/main.java b/src/main/java/net/elliebot/ellie/main.java new file mode 100644 index 0000000..1e838d8 --- /dev/null +++ b/src/main/java/net/elliebot/ellie/main.java @@ -0,0 +1,20 @@ +package net.elliebot.ellie; + +import com.aidanthebandit.banditbot2.events.HelloEvent; +import net.dv8tion.jda.api.JDA; +import net.dv8tion.jda.api.JDABuilder; +import net.dv8tion.jda.api.entities.Activity; +import net.dv8tion.jda.api.utils.Compression; +import net.dv8tion.jda.api.utils.cache.CacheFlag; + +public class main { + + public static void main(String args[]) throws Exception{ + + JDA jda = JDABuilder.createDefault("Bot-Token").build(); + + jda.addEventListener(new HelloEvent()); + } + + +} diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml new file mode 100644 index 0000000..b35bf85 --- /dev/null +++ b/src/main/resources/logback.xml @@ -0,0 +1,12 @@ + + + + + %d{HH:mm:ss.SSS} %boldCyan(%-34.-34thread) %red(%10.10X{jda.shard}) %boldGreen(%-15.-15logger{0}) %highlight(%-6level) %msg%n + + + + + + + \ No newline at end of file