-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Showing
3 changed files
with
17 additions
and
5 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 |
---|---|---|
|
@@ -35,12 +35,18 @@ BOT_STATUS_CHANNEL_ID = | |
# text channel in PRIMARY_GUILD where networth bug reports are logged to | ||
NETWORTH_BUG_REPORT_CHANNEL_ID = | ||
|
||
# text channel where NEU-repo updates are forward to (see step 6 in README) | ||
# text channel where NEU-repo updates are forwarded to (see step 6 in README) | ||
NEU_REPO_UPDATE_CHANNEL_ID = | ||
|
||
# GitHub link to your clone of https://github.com/kr45732/skyblock-plus-data formatted as is "username/repo" (e.g. "kr45732/skyblock-plus-data") | ||
# text channel where your self-hosted https://github.com/kr45732/rust-query-api webhook logs too | ||
QUERY_API_LOG_CHANNEL_ID = | ||
|
||
# GitHub link to your clone of https://github.com/kr45732/skyblock-plus-data formatted as "username/repo" (e.g. "kr45732/skyblock-plus-data") | ||
DATA_REPO_GITHUB = | ||
|
||
# email used for automatic GitHub commits in the data repo (e.g. "[email protected]") | ||
GITHUB_EMAIL = | ||
|
||
# used for prefix commands (mainly dev commands) | ||
# requires message content intent to be enabled to use prefix | ||
# if you don't have the message content intent & want to use prefix commands, then just mention the bot instead of a prefix | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -188,6 +188,8 @@ public class Utils { | |
public static String BOT_STATUS_CHANNEL_ID = ""; | ||
public static String NEU_REPO_UPDATE_CHANNEL_ID = ""; | ||
public static String DATA_REPO_GITHUB = ""; | ||
public static String GITHUB_EMAIL = ""; | ||
public static String QUERY_API_LOG_CHANNEL_ID = ""; | ||
public static TextChannel errorLogChannel; | ||
public static ShardManager jda; | ||
public static Database database; | ||
|
@@ -321,6 +323,8 @@ public static void initialize() { | |
BOT_STATUS_CHANNEL_ID = (String) appProps.get("BOT_STATUS_CHANNEL_ID"); | ||
NEU_REPO_UPDATE_CHANNEL_ID = (String) appProps.get("NEU_REPO_UPDATE_CHANNEL_ID"); | ||
DATA_REPO_GITHUB = (String) appProps.get("DATA_REPO_GITHUB"); | ||
GITHUB_EMAIL = (String) appProps.get("GITHUB_EMAIL"); | ||
QUERY_API_LOG_CHANNEL_ID = (String) appProps.get("QUERY_API_LOG_CHANNEL_ID"); | ||
} catch (IOException e) { | ||
HYPIXEL_API_KEY = System.getenv("HYPIXEL_API_KEY"); | ||
BOT_TOKEN = System.getenv("BOT_TOKEN"); | ||
|
@@ -352,6 +356,8 @@ public static void initialize() { | |
BOT_STATUS_CHANNEL_ID = System.getenv("BOT_STATUS_CHANNEL_ID"); | ||
NEU_REPO_UPDATE_CHANNEL_ID = System.getenv("NEU_REPO_UPDATE_CHANNEL_ID"); | ||
DATA_REPO_GITHUB = System.getenv("DATA_REPO_GITHUB"); | ||
GITHUB_EMAIL = System.getenv("GITHUB_EMAIL"); | ||
QUERY_API_LOG_CHANNEL_ID = System.getenv("QUERY_API_LOG_CHANNEL_ID"); | ||
} | ||
} | ||
|
||
|
@@ -871,8 +877,8 @@ public static void updateDataRepo() { | |
skyblockPlusDataRepo | ||
.commit() | ||
.setAllowEmpty(false) | ||
.setAuthor("kr45732", "[email protected]") | ||
.setCommitter("kr45732", "[email protected]") | ||
.setAuthor("Skyblock Plus", GITHUB_EMAIL) | ||
.setCommitter("Skyblock Plus", GITHUB_EMAIL) | ||
.setMessage("Automatic update (" + neuRepo.log().setMaxCount(1).call().iterator().next().getName() + ")") | ||
.call(); | ||
skyblockPlusDataRepo.push().setCredentialsProvider(new UsernamePasswordCredentialsProvider(GITHUB_TOKEN, "")).call(); | ||
|