Compare commits
2 Commits
c5eba642d0
...
e3eb892ee4
Author | SHA1 | Date |
---|---|---|
Kit Kasune | e3eb892ee4 | 2 years ago |
Kit Kasune | 8e8df4dadc | 2 years ago |
@ -1,7 +1,13 @@ |
|||||||
const express = require('express'); |
const express = require('express'); |
||||||
const api = express(); |
|
||||||
|
|
||||||
api.get('/', (req, res) => res.send("You've reached the wubzy.xyz API. If you're looking for Natsuki's endpoints, please append /natsuki to your query.")); |
module.exports = (client) => { |
||||||
api.get('/natsuki', (req, res) => res.send("You've reached Natsuki's API. Receiving this 200 reply indicates that Natsuki is online.")); |
const api = express(); |
||||||
|
client.api = {wubzy: {}, natsuki: {}}; |
||||||
|
client.api.wubzy.app = api; |
||||||
|
|
||||||
const server = api.listen(4072, () => console.log(`Ready at ${server.address().address}:${server.address().port}`)); |
client.api.wubzy.app.get('/', (req, res) => res.send("You've reached the wubzy.xyz API. If you're looking for Natsuki's endpoints, please append /natsuki to your query.")); |
||||||
|
client.api.wubzy.app.get('/natsuki', (req, res) => res.send("You've reached Natsuki's status endpoint. Receiving this 200 reply indicates that Natsuki is online. If you're looking for the Natsuki API, it has been moved to natsuki.app")); |
||||||
|
client.api.wubzy.app.get('/natsuki/:any?', (req, res) => res.status(301).send("Natsuki's API permanently resides at natsuki.app")); |
||||||
|
|
||||||
|
client.api.wubzy.server = client.api.wubzy.app.listen(4072, () => console.log(`Ready at ${client.api.wubzy.server.address().address}:${client.api.wubzy.server.address().port}`)); |
||||||
|
}; |
@ -0,0 +1,7 @@ |
|||||||
|
module.exports = { |
||||||
|
name: "ping", |
||||||
|
aliases: ["p"], |
||||||
|
async run(client, message, args, cmd) { |
||||||
|
message.reply("Pong! This is Natsuki v2 you're speaking with \\*tips hat*"); |
||||||
|
} |
||||||
|
}; |
@ -1,6 +1,8 @@ |
|||||||
module.exports = async client => { |
module.exports = async client => { |
||||||
client.basePrefix = client.config.options.dev ? client.config.options.prefix || "n!" : "n?"; |
client.basePrefix = client.config.options.dev ? client.config.options.prefix || client.config.bot.devPrefix : client.config.bot.prefix; |
||||||
|
|
||||||
require('../../startup/run/hello')(client); // startup info
|
require('../../startup/run/hello')(client); // startup info
|
||||||
require('../../startup/run/setstatus')(client); |
require('../../startup/run/setstatus')(client); |
||||||
|
|
||||||
|
require('../../../api/index')(client); |
||||||
}; |
}; |
Loading…
Reference in new issue