2022-05-10 01:17:25 +01:00
|
|
|
const config = require("./config.json");
|
|
|
|
const { Client, Collection } = require("discord.js");
|
2022-05-12 01:03:23 +01:00
|
|
|
const DiscordModal = require('discord-modal')
|
2022-05-10 01:17:25 +01:00
|
|
|
const client = new Client({
|
2022-05-11 21:37:08 +01:00
|
|
|
intents: 32767,
|
2022-05-10 01:17:25 +01:00
|
|
|
});
|
|
|
|
module.exports = client;
|
|
|
|
|
|
|
|
// Global Variables
|
|
|
|
client.commands = new Collection();
|
|
|
|
client.slashCommands = new Collection();
|
2022-05-12 01:03:23 +01:00
|
|
|
DiscordModal(client)
|
2022-05-10 01:17:25 +01:00
|
|
|
//client.config = require("./config.json");
|
|
|
|
|
|
|
|
// Initializing the project
|
|
|
|
require("./handler")(client);
|
|
|
|
|
2022-05-14 21:09:29 +01:00
|
|
|
var express = require('express');
|
|
|
|
var app = express(); // here I use the express() method, instead of the createServer()
|
|
|
|
|
|
|
|
|
|
|
|
app.get('/ping', (req, res) => {
|
|
|
|
console.info('Server was pinged');
|
|
|
|
res.send('Hello World');
|
|
|
|
});
|
|
|
|
|
|
|
|
var server = app.listen(3000, function() {
|
|
|
|
console.log('HullCSS is online')
|
|
|
|
console.log('Listening on port %d', server.address().port);
|
|
|
|
});
|
|
|
|
|
|
|
|
|
2022-05-10 01:17:25 +01:00
|
|
|
client.login(config.token);
|