-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b9d6f92
commit 902459e
Showing
16 changed files
with
472 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
# Node/NPM | ||
/node_modules/ | ||
|
||
# Latex Files | ||
*.aux | ||
*.fdb_latexmk | ||
*.fls | ||
*.synctex.gz | ||
|
||
# Compiled class file | ||
*.class | ||
|
||
# Log file | ||
*.log | ||
|
||
# BlueJ files | ||
*.ctxt | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.nar | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
|
||
# C Files | ||
*.o | ||
*.out | ||
|
||
# Maven | ||
/target/ | ||
|
||
# Gradle | ||
/build/ | ||
/.gradle/ | ||
/out/ | ||
gradle.properties | ||
|
||
# JetBrains IDEA | ||
/.idea/ | ||
/.fleet/ | ||
*.iml | ||
*.ipr | ||
*.iws | ||
|
||
# VSCode | ||
.vscode/ | ||
|
||
# Eclipse | ||
.classpath | ||
.project | ||
.settings/ | ||
/bin/ | ||
|
||
# Files containing safety info | ||
.env | ||
beta.json | ||
release.json | ||
|
||
# Logging Stuff | ||
/logs/ | ||
|
||
# Mac Stuff | ||
.DS_Store | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
|
||
# GITIGNORE FOR C PROJECTS | ||
# Prerequisites | ||
*.d | ||
|
||
# Object files | ||
*.o | ||
*.ko | ||
*.obj | ||
*.elf | ||
|
||
# Linker output | ||
*.ilk | ||
*.map | ||
*.exp | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Libraries | ||
*.lib | ||
*.a | ||
*.la | ||
*.lo | ||
|
||
# Shared objects (inc. Windows DLLs) | ||
*.dll | ||
*.so | ||
*.so.* | ||
*.dylib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
*.i*86 | ||
*.x86_64 | ||
*.hex | ||
|
||
# Debug files | ||
*.dSYM/ | ||
*.su | ||
*.idb | ||
*.pdb | ||
/cmake-build-debug/ | ||
|
||
# Kernel Module Compile Results | ||
*.mod* | ||
*.cmd | ||
.tmp_versions/ | ||
modules.order | ||
Module.symvers | ||
Mkfile.old | ||
dkms.conf | ||
|
||
# Rust Stuff | ||
debug/ | ||
target/ | ||
**/*.rs.bk | ||
*.pdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
# Node/NPM | ||
/node_modules/ | ||
|
||
# Latex Files | ||
*.aux | ||
*.fdb_latexmk | ||
*.fls | ||
*.synctex.gz | ||
|
||
# Compiled class file | ||
*.class | ||
|
||
# Log file | ||
*.log | ||
|
||
# BlueJ files | ||
*.ctxt | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.nar | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
|
||
# C Files | ||
*.o | ||
*.out | ||
|
||
# Maven | ||
/target/ | ||
|
||
# Gradle | ||
/build/ | ||
/.gradle/ | ||
/out/ | ||
gradle.properties | ||
|
||
# JetBrains IDEA | ||
/.idea/ | ||
/.fleet/ | ||
*.iml | ||
*.ipr | ||
*.iws | ||
|
||
# VSCode | ||
.vscode/ | ||
|
||
# Eclipse | ||
.classpath | ||
.project | ||
.settings/ | ||
/bin/ | ||
|
||
# Files containing safety info | ||
.env | ||
beta.json | ||
release.json | ||
|
||
# Logging Stuff | ||
/logs/ | ||
|
||
# Mac Stuff | ||
.DS_Store | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
|
||
# GITIGNORE FOR C PROJECTS | ||
# Prerequisites | ||
*.d | ||
|
||
# Object files | ||
*.o | ||
*.ko | ||
*.obj | ||
*.elf | ||
|
||
# Linker output | ||
*.ilk | ||
*.map | ||
*.exp | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Libraries | ||
*.lib | ||
*.a | ||
*.la | ||
*.lo | ||
|
||
# Shared objects (inc. Windows DLLs) | ||
*.dll | ||
*.so | ||
*.so.* | ||
*.dylib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
*.i*86 | ||
*.x86_64 | ||
*.hex | ||
|
||
# Debug files | ||
*.dSYM/ | ||
*.su | ||
*.idb | ||
*.pdb | ||
/cmake-build-debug/ | ||
|
||
# Kernel Module Compile Results | ||
*.mod* | ||
*.cmd | ||
.tmp_versions/ | ||
modules.order | ||
Module.symvers | ||
Mkfile.old | ||
dkms.conf | ||
|
||
# Rust Stuff | ||
debug/ | ||
target/ | ||
**/*.rs.bk | ||
*.pdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,9 @@ | |
ai.json | ||
menu.json | ||
|
||
# IntelliJ | ||
./.idea/ | ||
|
||
# Compiled class file | ||
*.class | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
bot/src/main/java/com/beanbeanjuice/cafebot/utility/listeners/MutualGuildsListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.beanbeanjuice.cafebot.utility.listeners; | ||
|
||
import com.beanbeanjuice.cafeapi.wrapper.endpoints.mutualguilds.MutualGuildsEndpoint; | ||
import lombok.RequiredArgsConstructor; | ||
import net.dv8tion.jda.api.events.message.MessageReceivedEvent; | ||
import net.dv8tion.jda.api.hooks.ListenerAdapter; | ||
|
||
@RequiredArgsConstructor | ||
public class MutualGuildsListener extends ListenerAdapter { | ||
|
||
private final MutualGuildsEndpoint mutualGuildsEndpoint; | ||
|
||
@Override | ||
public void onMessageReceived(MessageReceivedEvent event) { | ||
if (!event.isFromGuild()) return; | ||
if (event.getAuthor().isBot()) return; | ||
|
||
String guildID = event.getGuild().getId(); | ||
String userID = event.getAuthor().getId(); | ||
|
||
this.mutualGuildsEndpoint.addMutualGuild(userID, guildID); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.