Basic setup
This commit is contained in:
parent
34ab0a0a18
commit
f743135197
|
@ -1,3 +1,9 @@
|
||||||
|
# Project specific
|
||||||
|
|
||||||
|
token.json
|
||||||
|
guilds.json
|
||||||
|
log
|
||||||
|
|
||||||
### Node ###
|
### Node ###
|
||||||
# Logs
|
# Logs
|
||||||
logs
|
logs
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible Node.js debug attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"name": "Launch Program",
|
||||||
|
"program": "${workspaceRoot}/wrapper.js"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
//acts as on ready function
|
||||||
|
module.exports = (client) => {
|
||||||
|
client.on("message", message => message.reply("Hello!"));
|
||||||
|
//check messages in channel for links posted since last online
|
||||||
|
|
||||||
|
//set up an interval to check all the feeds
|
||||||
|
|
||||||
|
//set up an on message handler to detect when links are posted
|
||||||
|
};
|
|
@ -18,6 +18,7 @@
|
||||||
"homepage": "https://github.com/benji7425/discord-bot-feed-linker#readme",
|
"homepage": "https://github.com/benji7425/discord-bot-feed-linker#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"discord.js": "11.1.0",
|
"discord.js": "11.1.0",
|
||||||
|
"discordjs-util": "git+https://github.com/benji7425/discordjs-util.git",
|
||||||
"dns": "0.2.2",
|
"dns": "0.2.2",
|
||||||
"feed-read": "0.0.1",
|
"feed-read": "0.0.1",
|
||||||
"urijs": "1.18.10"
|
"urijs": "1.18.10"
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const Util = require("discordjs-util");
|
||||||
|
|
||||||
|
const client = new Discord.Client();
|
||||||
|
|
||||||
|
process.on("uncaughtException", (err) => {
|
||||||
|
Util.dateError(err);
|
||||||
|
});
|
||||||
|
|
||||||
|
client.login(require("./token.json").token);
|
||||||
|
|
||||||
|
client.on("ready", () => {
|
||||||
|
require("./app/index.js")(client);
|
||||||
|
});
|
||||||
|
|
||||||
|
client.on("disconnect", eventData => {
|
||||||
|
Util.dateError(eventData.code, eventData.reason);
|
||||||
|
});
|
Loading…
Reference in New Issue