Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #23 from Mr-Smarty/main
Browse files Browse the repository at this point in the history
Command count for stats
  • Loading branch information
mebrooks01 authored Jun 12, 2021
2 parents 1677594 + 5497777 commit 1b0ef2b
Show file tree
Hide file tree
Showing 38 changed files with 56 additions and 81 deletions.
3 changes: 1 addition & 2 deletions commands/Missions/mars.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { Command } = require('discord.js-commando')
const config = require('$root/config.json')
const mission = require('$root/mission.json')
const count = require('$util/count')

module.exports = class Mars extends Command {
constructor(client) {
Expand All @@ -16,7 +15,7 @@ module.exports = class Mars extends Command {
}

run(message) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)
let info = mission.other.mars

message.embed({
Expand Down
3 changes: 1 addition & 2 deletions commands/Rovers/curiosity.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const { Command } = require('discord.js-commando')
const axios = require('axios')
const config = require('$root/config.json')
const mission = require('$root/mission.json')
const count = require('$util/count')

module.exports = class Curiosity extends Command {
constructor(client) {
Expand Down Expand Up @@ -39,7 +38,7 @@ module.exports = class Curiosity extends Command {
}

run(message, { type, sol, result_number }) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)

let info = mission.rover.curiosity

Expand Down
3 changes: 1 addition & 2 deletions commands/Rovers/opportunity.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const { Command } = require('discord.js-commando')
const axios = require('axios')
const config = require('$root/config.json')
const mission = require('$root/mission.json')
const count = require('$util/count')

module.exports = class Opportunity extends Command {
constructor(client) {
Expand Down Expand Up @@ -39,7 +38,7 @@ module.exports = class Opportunity extends Command {
}

run(message, { type, sol, result_number }) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)

let info = mission.rover.opportunity

Expand Down
3 changes: 1 addition & 2 deletions commands/Rovers/perseverance.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const { Command } = require('discord.js-commando')
const axios = require('axios')
const config = require('$root/config.json')
const mission = require('$root/mission.json')
const count = require('$util/count')

module.exports = class Perseverance extends Command {
constructor(client) {
Expand Down Expand Up @@ -39,7 +38,7 @@ module.exports = class Perseverance extends Command {
}

run(message, { type, sol, result_number }) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)

let info = mission.rover.perseverance

Expand Down
3 changes: 1 addition & 2 deletions commands/Rovers/spirit.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const { Command } = require('discord.js-commando')
const axios = require('axios')
const config = require('$root/config.json')
const mission = require('$root/mission.json')
const count = require('$util/count')

module.exports = class NAME extends Command {
constructor(client) {
Expand Down Expand Up @@ -39,7 +38,7 @@ module.exports = class NAME extends Command {
}

run(message, { type, sol, result_number }) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)

let info = mission.rover.spirit

Expand Down
2 changes: 1 addition & 1 deletion commands/missions/climate-orbiter.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = class ClimateOrbiter extends Command {
}

run(message) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)
let info = mission.missions.climate_orbiter

message.embed({
Expand Down
3 changes: 1 addition & 2 deletions commands/missions/exomars.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { Command } = require('discord.js-commando')
const config = require('$root/config.json')
const mission = require('$root/mission.json')
const count = require('$util/count')

module.exports = class ExoMars extends Command {
constructor(client) {
Expand All @@ -17,7 +16,7 @@ module.exports = class ExoMars extends Command {
}

run(message) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)
let info = mission.missions.exomars

message.embed({
Expand Down
3 changes: 1 addition & 2 deletions commands/missions/global-surveyor.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const { Command } = require('discord.js-commando')
const config = require('$root/config.json')
const count = require('$util/count')

module.exports = class globalsurveyor extends Command {
constructor(client) {
Expand All @@ -16,7 +15,7 @@ module.exports = class globalsurveyor extends Command {
}

run(message) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)
let info = mission.missions.global_surveyor

message.embed({
Expand Down
3 changes: 1 addition & 2 deletions commands/missions/mariner.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { Command } = require('discord.js-commando')
const config = require('$root/config.json')
const mission = require('$root/mission.json')
const count = require('$util/count')

module.exports = class mariner extends Command {
constructor(client) {
Expand All @@ -17,7 +16,7 @@ module.exports = class mariner extends Command {
}

run(message) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)
let info = mission.missions.mariner

message.embed({
Expand Down
3 changes: 1 addition & 2 deletions commands/missions/mars-express.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { Command } = require('discord.js-commando')
const config = require('$root/config.json')
const mission = require('$root/mission.json')
const count = require('$util/count')

module.exports = class MarsExpress extends Command {
constructor(client) {
Expand All @@ -17,7 +16,7 @@ module.exports = class MarsExpress extends Command {
}

run(message) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)
let info = mission.missions.express

message.embed({
Expand Down
3 changes: 1 addition & 2 deletions commands/missions/maven.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { Command } = require('discord.js-commando')
const config = require('$root/config.json')
const mission = require('$root/mission.json')
const count = require('$util/count')

module.exports = class Maven extends Command {
constructor(client) {
Expand All @@ -16,7 +15,7 @@ module.exports = class Maven extends Command {
}

run(message) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)
let info = mission.missions.maven

message.embed({
Expand Down
3 changes: 1 addition & 2 deletions commands/missions/mro.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { Command } = require('discord.js-commando')
const config = require('$root/config.json')
const mission = require('$root/mission.json')
const count = require('$util/count')

module.exports = class MRO extends Command {
constructor(client) {
Expand All @@ -16,7 +15,7 @@ module.exports = class MRO extends Command {
}

run(message) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)
let info = mission.missions.mro

message.embed({
Expand Down
3 changes: 1 addition & 2 deletions commands/missions/observer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { Command } = require('discord.js-commando')
const config = require('$root/config.json')
const mission = require('$root/mission.json')
const count = require('$util/count')

module.exports = class Observer extends Command {
constructor(client) {
Expand All @@ -16,7 +15,7 @@ module.exports = class Observer extends Command {
}

run(message) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)
let info = mission.missions.observer

message.embed({
Expand Down
3 changes: 1 addition & 2 deletions commands/missions/odyssey.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { Command } = require('discord.js-commando')
const config = require('$root/config.json')
const mission = require('$root/mission.json')
const count = require('$util/count')

module.exports = class Odyssey extends Command {
constructor(client) {
Expand All @@ -16,7 +15,7 @@ module.exports = class Odyssey extends Command {
}

run(message) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)
let info = mission.missions.odyssey

message.embed({
Expand Down
3 changes: 1 addition & 2 deletions commands/missions/pathfinder.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { Command } = require('discord.js-commando')
const config = require('$root/config.json')
const mission = require('$root/mission.json')
const count = require('$util/count')

module.exports = class Pathfinder extends Command {
constructor(client) {
Expand All @@ -16,7 +15,7 @@ module.exports = class Pathfinder extends Command {
}

run(message) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)
let info = mission.missions.pathfinder

message.embed({
Expand Down
3 changes: 1 addition & 2 deletions commands/missions/phoenix.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { Command } = require('discord.js-commando')
const config = require('$root/config.json')
const mission = require('$root/mission.json')
const count = require('$util/count')

module.exports = class NAME extends Command {
constructor(client) {
Expand All @@ -16,7 +15,7 @@ module.exports = class NAME extends Command {
}

run(message) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)
let info = mission.missions.phoenix

message.embed({
Expand Down
3 changes: 1 addition & 2 deletions commands/missions/polar-lander.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { Command } = require('discord.js-commando')
const config = require('$root/config.json')
const mission = require('$root/mission.json')
const count = require('$util/count')

module.exports = class NAME extends Command {
constructor(client) {
Expand All @@ -17,7 +16,7 @@ module.exports = class NAME extends Command {
}

run(message) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)
let info = mission.missions.polar

message.embed({
Expand Down
3 changes: 1 addition & 2 deletions commands/missions/viking.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { Command } = require('discord.js-commando')
const config = require('$root/config.json')
const mission = require('$root/mission.json')
const count = require('$util/count')

module.exports = class NAME extends Command {
constructor(client) {
Expand All @@ -17,7 +16,7 @@ module.exports = class NAME extends Command {
}

run(message) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)
let info = mission.missions.mro

message.embed({
Expand Down
3 changes: 1 addition & 2 deletions commands/search/apod.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { Command } = require('discord.js-commando')
const axios = require('axios')
const config = require('$root/config.json')
const count = require('$util/count')
let img = ''

module.exports = class APOD extends Command {
Expand All @@ -17,7 +16,7 @@ module.exports = class APOD extends Command {
}

run(message) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)

axios
.get(`https://api.nasa.gov/planetary/apod?api_key=${config.api_key}`)
Expand Down
3 changes: 1 addition & 2 deletions commands/search/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const axios = require('axios')
const moment = require('moment')
const config = require('$root/config.json')
const mission = require('$root/mission.json')
const count = require('$util/count')

module.exports = class Image extends Command {
constructor(client) {
Expand Down Expand Up @@ -58,7 +57,7 @@ module.exports = class Image extends Command {
run(message, { rover, date, camera, result_number }) {
if (camera == undefined) camera = 'all'

count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)
let url = `https://api.nasa.gov/mars-photos/api/v1/rovers/${rover}/photos?`
let date_mod = date.replace('/', '-')

Expand Down
3 changes: 1 addition & 2 deletions commands/search/insight.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const { Command } = require('discord.js-commando')
const axios = require('axios')
const config = require('$root/config.json')
const mission = require('$root/mission.json')
const count = require('$util/count')

module.exports = class Insight extends Command {
constructor(client) {
Expand All @@ -28,7 +27,7 @@ module.exports = class Insight extends Command {
}

run(message, { type }) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)

let info = mission.other.insight

Expand Down
3 changes: 1 addition & 2 deletions commands/search/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const { Command } = require('discord.js-commando')
const axios = require('axios')
const config = require('$root/config.json')
const mission = require('$root/mission.json')
const count = require('$util/count')

module.exports = class Manifest extends Command {
constructor(client) {
Expand Down Expand Up @@ -33,7 +32,7 @@ module.exports = class Manifest extends Command {
}

run(message, { rover, sol }) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)

axios
.get(`https://api.nasa.gov/mars-photos/api/v1/manifests/${rover}?api_key=${config.api_key}`)
Expand Down
3 changes: 1 addition & 2 deletions commands/search/search.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { Command } = require('discord.js-commando')
const axios = require('axios')
const config = require('$root/config.json')
const count = require('$util/count')

module.exports = class Search extends Command {
constructor(client) {
Expand All @@ -24,7 +23,7 @@ module.exports = class Search extends Command {
}

run(message, { search_term }) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)

axios
.get('https://images-api.nasa.gov/search?q=' + search_term)
Expand Down
3 changes: 1 addition & 2 deletions commands/util/bug.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { Command } = require('discord.js-commando')
const config = require('$root/config.json')
const mission = require('$root/mission.json')
const count = require('$util/count')

module.exports = class Bug extends Command {
constructor(client) {
Expand All @@ -17,7 +16,7 @@ module.exports = class Bug extends Command {
}

run(message) {
count.cmdRun(this.name, this.group, message)
this.client.cmdCount.run(this.name, this.group, message)
let info = mission.other.bug

message.embed({
Expand Down
Loading

0 comments on commit 1b0ef2b

Please sign in to comment.