Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ public int getCooldown() {
@Override
public void onCommand(TextChannel channel, Member m, SlashCommandEvent e) {
APIStatus spigotStatus = bot.getSpigotStatus();
APIStatus marketStatus = bot.getSpigotStatus();
APIStatus marketStatus = bot.getMarketStatus();
APIStatus songodaStatus = bot.getSongodaStatus();

StringBuilder sb = new StringBuilder();
appendStatus("Spigot", spigotStatus, sb, m);
appendStatus("MC-Market", spigotStatus, sb, m);
appendStatus("MC-Market", marketStatus, sb, m);
appendStatus("Songoda", songodaStatus, sb, m);

e.replyEmbeds(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void run() {
try {
URL url = new URL("https://songoda.com/api/dashboard/payments?token=" + getToken() + "&per_page=2000000");
HttpURLConnection httpcon = (HttpURLConnection) url.openConnection();
httpcon.addRequestProperty("User-Agent", "Mozilla/4.76");
httpcon.addRequestProperty("User-Agent", "Mozilla/5.0");
httpcon.connect();

JsonArray data = JsonParser.parseReader(new InputStreamReader((InputStream) httpcon.getContent())).getAsJsonObject().getAsJsonArray("data");
Expand All @@ -76,7 +76,6 @@ public void run() {
int userId = object.get("user_id").getAsInt();

SongodaPurchase sp = new SongodaPurchase(Plugin.byEmojiName(product.replace(" ", "")).getResourceId(), new User(String.valueOf(userId), username, avatar), new Time(new SimpleDateFormat("MMM dd, yyyy 'at' hh:mm a").format(new Date(createdAt)), createdAt), new Cost(currency, cost), discordId == null ? discord : discordId);
//sp.inject(TechDiscordBot.getSpigotAPI().getData().get());

this.purchases.add(sp);
});
Expand Down